473,545 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML Templates stored in Postgres using Perl

Sam
I would like to store html templates in a database. By using perl I
would like to retrive the template ask the user to fill the template
and store the whole file is template + the user data in a database.
How can I do this? Should I use Perl Mason to do this.

Or Can I store the template in database using text field and then
retrive the template from database using select command and then save
the html template to a file. Then in form action give the template
file name. The template will be displayed. Then ask the user enter the
values and by some method insert the user values in the template and
store the whole file in the database.

Can anyone suggest suitable methods for doing this.
Jul 19 '05 #1
2 5934
Sam
Actually I have to give the user to choose different templates, styles
and files. For each templates there are different styles stored in the
database. I have to store not only the values the user entered but the
whole form in the database for retrival. Suppose the user wants to see
the file he just created. Then he can give the filename and view the
results. I have done this using Perl DBI for storing the user entered
values in the tables. But Now I am trying to create seperate html
templates and store it in the database.

wgu_@_wurquhart .co.uk (Wm. G. Urquhart) wrote in message news:<m2******* *****@factotum. wurquhart.co.uk >...
vp******@yahoo. com (Sam) writes:
I would like to store html templates in a database. By using perl I
would like to retrive the template ask the user to fill the template
and store the whole file is template + the user data in a database.
How can I do this? Should I use Perl Mason to do this.


You can do this using just Perl and the DBI.
Or Can I store the template in database using text field and then
retrive the template from database using select command and then save
the html template to a file. Then in form action give the template
file name. The template will be displayed. Then ask the user enter the
values and by some method insert the user values in the template and
store the whole file in the database.

Can anyone suggest suitable methods for doing this.


Why would you want to store a copy of the template for every submission?
IMHO, it would be better to create a table or tables to store the result
of the posting. You'd have much greater control over the analysis of the
results.

Jul 19 '05 #2
vp******@yahoo. com (Sam) writes:
Actually I have to give the user to choose different templates, styles
and files. For each templates there are different styles stored in the
database. I have to store not only the values the user entered but the
whole form in the database for retrival. Suppose the user wants to see
the file he just created. Then he can give the filename and view the
results. I have done this using Perl DBI for storing the user entered
values in the tables. But Now I am trying to create seperate html
templates and store it in the database.

Please don't top post. If you don't know what it is then find out
before you reply please.

Ok, I assume when you say templates you are referring to an HTML form
template? Again I'm assuming here that you mean a style to be a
CSS. But what do you mean by files?

If you are doing what I think you are doing I'd be inclined to use
cookies to store the users prefs. If cookies aren't an option do the
users of the system have to login? If they do then you can store the
users' prefs in the DB, and retrieve them at login.

Also, storing the templates in the DB is quite redundant since you
have the overhead of getting it out. It would be easier and quicker if
you stored them on the FS.

--
Regards,

William
s/_//g to reply
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2351
by: Dave Smithz | last post by:
Hi, Summary: Best way to divide out the HTML and PHP in some code I inherited. How can I keep the HTML files separate? Full Details: I've now been working two weeks on PHP / MySQL code I inherited and the client is a happy bunny. This was my first crash course outing with PHP, but with basic PERL experience found it fairly easy to pick...
1
3986
by: C. Olive | last post by:
Environment: Classic ASP running on IIS v5.1 Scripting Language: VBScript I suppose someone would have to be somewhat familiar with Perl in order to answer this question specifically. If you are not intimately familiar with Perl, then perhaps you can still help by reading through the lines here... I'm looking for a templating system in...
2
1954
by: Edwin Quijada | last post by:
Hi! Where can I find examples to accesing postgres with perl. TIA _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.yupimsn.com/ ---------------------------(end of broadcast)---------------------------
15
4240
by: Birahim FALL | last post by:
Hi, I'm very fresh to PostgreSQL, coming from Oracle. I want to developp web applications based on apache and postgresql. Is there an equivalent of OWA server (Oracle Web Application server) for postgresql. Shortly, OWA provides an apache module and a set of stored procedures/functions that generate html pages. A simple example could be...
0
13109
by: Audrey Pratt | last post by:
Happy Holidays to you and allow us to play Santa this year with these awsome deals that in anyway you can refuse: 2000 Web Templates for only $18.00 (Savings Over $1,000.00) http://bit-4-bit.com/packages/Templates/10000_templates.htm 1000 Web Templates For Only $10.00 (Savings Over $500.00) ...
1
3856
by: Jack Orenstein | last post by:
I'm trying to configure PHP 5.2.0 with support for Postgres 8.1.3. Postgres was installed with FC5 without source. PHP's configure needs source. When I run configure: configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path I tried downloading Postgres source and modifying PHPs configure to point to...
0
2994
by: zaky | last post by:
I have a problem when upgrade to new version Postgres (v8.x.x) on Reh HAT 9.0. i was uninstall old version (Postgres 7.x.x) package with command rpm -e postgresqlxxxxx.rpm but only one package can't to erase : postgresql-libs-7xxxx.rpm bcause there are one package need this lib : perl-DBD-xxxxx. what can i do ? erase this package...
11
11572
by: doulos05 | last post by:
I am working on an xml project that will contain numerous documents which will be edited by about 100-150 non-technical people on a regular basis. Because of this, I am trying to make it as simple as possible for them. This project is an internal project so it will only ever be viewed on IE 6.x (or maybe 7.x if my company ever decides to...
4
1901
by: Jeff | last post by:
I've been working on porting some perl CMS code to PHP. What I would do in perl is search through a template for instruction and replace those instructions with specific bits for that particular page and page path. With PHP it's easy to embed instruction in the html and output thhat as a .php page. How do I write a .html as a file? I...
0
7393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7803
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7411
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7749
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5322
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3444
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1871
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
695
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.