This is a discussion on $parse_form ... anybody know how it works ? within the Windows Web Servers forums, part of the Web Server and Related Forums category; When I tried to pass data from first.cgi to second.pl with GET method, I got error. See the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When I tried to pass data from first.cgi to second.pl with GET method,
I got error. See the following error messgae. I used $parse_form module. But I got error for it. Anybody help me?? [error] [client 127.0.0.1] Undefined subroutine &main::parse_form called at C:/Program Files/Apache Group/Apache2/cgi-bin/second.pl line 6.\r, referer: http://localhost/cgi-bin/first.cgi PS. I used ActivePerl. |
|
|||
|
////////////////////// first.cgi
///////////////////////////////////// !c:/Perl/bin/Perl.exe -w print "Content-type: text/html\n\n"; &parse_form; print <<OKAY; <form method="get" action="second.pl"><br> A = <input name="a" size=3 value="$FORM{a}"><br> B = <input name="b" size=3 value="$FORM{b}"> <input type="hidden" name="match" value=1> <input type="submit" value="Calc"></form> OKAY ////////////////////////////////////// second.pl //////////////////////////////// #!c:/Perl/bin/Perl.exe -w print "Content-Type: text/html\n\n"; &parse_form; if ($FORM{'match'} == 1){ print "A + B = ",$FORM{'a'}+$FORM{'b'},"<br>"; //////////////////////////////// error /////////////////////////////// If I used $parse_form in first.cgi, there was no error message. But it didn't work. ( I didn't see any edit box and button. ) If I used $parse_form in second.pl, I got following error. [error] [client 127.0.0.1] Undefined subroutine &main::parse_form |