I'd use my favorite module HTML::Template. Untested:
HTML for form1.cgi:
<form action="foo1.pl" method="post"> <input type="text" name="firstname" /> <input type="text" name="lastname" /> <input type="submit" /> </form>
PERL foo1.pl:
#!/usr/bin/perl use strict; use CGI qw /:cgi/; use HTML::Template; my $query = new CGI; $template = HTML::Template->new( filename => 'form2.tmpl' ); $template -> param( firstname => $query->param('firstname'), lastname => $query->param('lastname') ); print $template->output;
HTML form2.tmpl:
<form action="foo2.pl" method="post"> <input type="text" name="firstname" value="<tmpl_var firstname>" /> <input type="text" name="lastname" value="<tmpl_var lastname>" /> <input type="submit" /> </form>
And if you are using selects, checkboxes, or radio buttons, HTML::FillInForm is great. Hope your father approves.
In reply to Re: form to cgi to cgi
by bradcathey
in thread form to cgi to cgi
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |