Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Keeping Form Values

by tcf22 (Priest)
on Oct 22, 2003 at 00:14 UTC ( [id://301119]=note: print w/replies, xml ) Need Help??


in reply to Keeping Form Values

If you are redirecting you need to do $q->redirect("form.cgi?key1=val1&key2=val2");
You also combine them into 1 script and do something like this
if(defined $q->param('form_submitted')){ if(&errors){ #Error occured &display_form($q); }else{ &thank_you; } }else{ &display_form; } sub display_form(){ ##Do form stuff }
Also in display_form(), you might want to consider using HTML::Template and doing
$temp = HTML::Template->new( file => 'file.tmpl', associate => $q );
which will put all the submitted values into the template as long as the associated <TMPL_VAR NAME=".."> tags are there.

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://301119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found