Home > Archive > PERL CGI Beginners > January 2005 > Catching a query string
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Catching a query string
|
|
|
| If I type in my browser a URL to call a test CGI script on my local Apache
server, like this:
http://mymachine/cgi-bin/test.cgi?b=delete
and in the script use the following code:
use CGI;
my $q = new CGI;
my %fd = $q->Vars;
print "Content-type:text/html\n\n";
print $fd{b};
Then nothing is printed out.
I thought the above code was supposed to pull in the QUERY_STRING and break
it down into key/value pairs?
Indeed, if I print out $ENV{QUERY_STRING} it returns this:
QUERY_STRING = b=delete
Any ideas why the CGI module isn't picking it up?
Bigus
| |
|
| Actually, forget that - it was a wild goose chase - sorry!
"Bigus" <b1gus AT creationfactor DOT net> wrote in message
news:euWdnS0Dfp1B0GzcRVnyhA@giganews.com...
> If I type in my browser a URL to call a test CGI script on my local Apache
> server, like this:
>
> http://mymachine/cgi-bin/test.cgi?b=delete
>
> and in the script use the following code:
>
> use CGI;
> my $q = new CGI;
> my %fd = $q->Vars;
> print "Content-type:text/html\n\n";
> print $fd{b};
>
> Then nothing is printed out.
>
> I thought the above code was supposed to pull in the QUERY_STRING and
> break it down into key/value pairs?
>
> Indeed, if I print out $ENV{QUERY_STRING} it returns this:
>
> QUERY_STRING = b=delete
>
> Any ideas why the CGI module isn't picking it up?
>
> Bigus
>
>
|
|
|
|
|