good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: How to convert an @ARGV to form based input?by ig (Vicar) |
on Aug 21, 2012 at 14:02 UTC ( [id://988744]=note: print w/replies, xml ) | Need Help?? |
From CGI: It is possible for a script to receive CGI parameters in the URL as well as in the fill-out form by creating a form that POSTs to a URL containing a query string (a "?" mark followed by arguments). The param() method will always return the contents of the POSTed fill-out form, ignoring the URL's query string. To retrieve URL parameters, call the url_param() method. Use it in the same way as param(). The main difference is that it allows you to read the parameters, but not set them. So, you can easily ignore parameters from the URL when using CGI. If you are parsing the CGI inputs otherwise, you will have to look to the tools you are using to find out what your options are. When you are delivering the blank form, you can ignore parameters entirely, if that suits you. For an empty form input field, I would use something like:
If the user enters a URL that refers to your CGI script and includes a query string in the URL, you could detect this and issue a redirect to a URL without a query string.
In Section
Seekers of Perl Wisdom
|
|