punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
I have a standard HTML form for search engine input on a regular HTML page. The form action is set to use GET and to call not a Perl script, but an SHTML page with an embedded SSI-call to a Perl script, like this:
Search Page
<FORM method="GET" action="search_results.shtml"> <input type="text" name="query"> <input type="submit"> </form>
search_results.shtml
<html> <head></head> <body> <!--#include virtual="/includes/header.htm" --> <!--#include virtual="/cgi-bin/search_script.pl" --> <!--#include virtual="/includes/footer.htm" --> </html>
The idea was that the full url of search_results.shtml, being called from a form using GET, will have the search terms tacked on the end as a query substring. So, we'd have search_script.pl read $ENV{HTTP_REFERER}, which is search_Results.pl, and strip the substring off to get the origial search terms.
It would be nice to have cgi-pm do this stripping and formatting, but I don't konw how to get it to do that.
Of course, any smarter way of doing this is welcome too.
Thanks.
Forget that fear of gravity,
Get a little savagery in your life.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Extract form fields & values from query string of http_referrer
by Leviathan (Scribe) on Oct 18, 2006 at 07:26 UTC | |
Re: Extract form fields & values from query string of http_referrer
by shmem (Chancellor) on Oct 18, 2006 at 07:29 UTC | |
Re: Extract form fields & values from query string of http_referrer
by monarch (Priest) on Oct 18, 2006 at 07:27 UTC | |
Re: Extract form fields & values from query string of http_referrer
by punch_card_don (Curate) on Oct 24, 2006 at 00:49 UTC | |
by grashoper (Monk) on Jul 20, 2007 at 00:03 UTC |