|
Home > Archive > Web Servers on Windows > January 2005 > $parse_form ... anybody know how it works ?
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 |
$parse_form ... anybody know how it works ?
|
|
|
| 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
| |
|
| I am really sorry. I got it. It was my mistake.
|
|
|
|
|