glassgiant
asked on
Perl CGI param() function not getting POST variables
I am trying to port a huge amount of code to my laptop for testing. The live system and test systems are Perl 5.8.7 on IIS. Until an hour ago it was going well and I could read POST variables. I changed nothing in the configuration. Now I cannot read POST variables using param(). This is very weird.
I have simplified the code below. On my live system, when I click "POST working", I see "SUBMIT: POST working". On the test system I see only "SUBMIT:". If I click the "GET working" button on either, I see "SUBMIT: GET working".
Any ideas? Unfortunately, I cannot change the param() to use something like $q->param(), etc., as there are hundreds of files...
I have simplified the code below. On my live system, when I click "POST working", I see "SUBMIT: POST working". On the test system I see only "SUBMIT:". If I click the "GET working" button on either, I see "SUBMIT: GET working".
Any ideas? Unfortunately, I cannot change the param() to use something like $q->param(), etc., as there are hundreds of files...
use CGI qw(:standard);
print "Content-type:text/html\n\n";
print "SUBMIT: ". param('submit');
print<<EOF;
<form method="POST" action="test.pl">
POST FORM
<input type="submit" name="submit" value="POST working">
</form>
<form method="GET" action="test.pl">
GET FORM
<input type="submit" name="submit" value="GET working">
</form>
EOF
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the quick response. I usually tell users to restart when weirdness happens. I should have taken my own advice...
ASKER