fred has asked for the wisdom of the Perl Monks concerning the following question:
I have a web page that, for various reasons, is using multiple server side includes written in Perl. That is, the edit.shtml file contains lines similar to <!--#include virtual="/cgi-bin/edit.pl"-->;.
When I link to the page with a parameter, with something like <a href="/edit.shtml?id=200">, I would like to be able to access the id parameter in my perl script using the CGI module. However, the following code snippet fails to recognize them:
I would hope that it would print, "ID = [200]", and it does when I link directly to the perl script. But when its an SSI, it prints "ID = []". Is there a good way to get my parameters back short of parsing $ENV{QUERY_STRING_UNESCAPED} by hand?#!/usr/bin/perl -w use CGI; my $page = new CGI; my $id = $page->param("id"); print $page->header(); print "<P>ID = [$id]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SSI losing CGI parameters
by dws (Chancellor) on Jan 25, 2001 at 22:46 UTC | |
by isotope (Deacon) on Jan 25, 2001 at 23:37 UTC | |
|
Re: SSI losing CGI parameters
by baku (Scribe) on Jan 26, 2001 at 01:56 UTC | |
|
Re: SSI losing CGI parameters
by jeorgen (Pilgrim) on Feb 02, 2001 at 13:03 UTC | |
|
Re: SSI losing CGI parameters
by fred (Acolyte) on Jan 26, 2001 at 07:59 UTC | |
by dws (Chancellor) on Jan 26, 2001 at 10:29 UTC |