472,791 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

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 5854
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
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...
1
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...
2
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:...
15
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...
0
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) ...
1
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...
0
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...
11
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...
4
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.