in reply to CGI Cookies
Assuming I'm understanding your question, you'd like to avoid the user getting 2 page updates, one to get the cookie, the second to load the second page of the form. Essentially, you can't "do" anything in the browser without it loading a page. The way I tend to handle multipage scripts is to put all the functions into one script, rather than a mix of CGIs to process them and HTML pages served separately.
the hatter
In your example, your script called with no parameters would print the first page (either by including the HTML in you script, or by opening a file containing the page or page snippet and printing its contents); the script called with valid form fields prints the second page, including a cookie header; the script called with invalid form fields prints the first page, possibly processed to mark which field was incorrectly filled in, pre-fills any fields the user entered correctly, etc.
the hatter
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: CGI Cookies
by Trihedralguy (Pilgrim) on Feb 18, 2008 at 15:05 UTC | |
by CountZero (Bishop) on Feb 18, 2008 at 15:43 UTC | |
by dsheroh (Monsignor) on Feb 18, 2008 at 18:14 UTC | |
by Trihedralguy (Pilgrim) on Feb 18, 2008 at 19:18 UTC |
In Section
Seekers of Perl Wisdom