CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Writing a cgi page builder in Perl, need help

 



TheGoobCow
New User

Nov 8, 2004, 3:31 PM

Post #1 of 2 (458 views)
Writing a cgi page builder in Perl, need help Can't Post

Ok. I'm writing a CGI to build a very simple webpage. It has some forms, and it asks the users name, gives the user a series of checkboxes with different sections of the website next to them, and a few radio buttons with color names next to them.

When the user clicks a few sections (such as news and sports) and a color (red), it displays the page again with the same form at the top, while displaying the news and sports on a page with a red background.

Here's the problem. I want the form to remain the same after the user hits submit (instead of being cleared or filled with default values) Also, I want a cookie created that remembers this data when the user leaves and restores it if(hopefully when :) ) they return. Can anyone point me in the right direction to get this done? Thanks!


KevinR
Veteran


Nov 8, 2004, 6:13 PM

Post #2 of 2 (457 views)
Re: [TheGoobCow] Writing a cgi page builder in Perl, need help [In reply to] Can't Post

If you use the CGI module to parse the form I believe the values of the form fields are carried over if the form is reprinted.

As far as the cookie, you can also use the CGI module to read and write cookies. How you store the data in the cookie is up to you within the limitations of a cookie file.

See the documentation for the CGI module which can be read on www.perldoc.com (unless the site is down again) or here is another link to the same document (I think):

http://stein.cshl.org/WWW/software/CGI/
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives