[ale] OT: Perl redirect that retains form fields
Stan Hearn
Stan.Hearn at ipst.edu
Wed May 8 20:23:05 EDT 2002
At 12:16 PM 5/7/2002 -0400, you wrote:
>Is there a way to redirect a perl request to another file and retain the
>form fields?
>
>I know how to do the following, but it doesn't seem to retain the form field
>values:
>print "Location: somepage.pl\n\n";
>
>What I would like to do is submit requests to a single page, then based on a
>View/Edit/Update parameter, pass the request to another page. The initial
>request will have many form field values, and I want these to be available
>on the page the request is redirectd to. How do you do this in Perl?
If you don't care that the form values appear in the URL, then do a form action of GET and then in your script do
print "Location: somepage.pl?$ENV{QUERY_STRING}\n\n";
Then your new script would have access to the exact form vars.
This all depends on wether you care that the submitter sees the form values in the URL. But it would work with different servers and different CGI-BIN directories.
STAN
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list