Web Servers on Windows - $parse_form ... anybody know how it works ?

This is Interesting: Free IT Magazines  
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 ?
latt

2005-01-19, 2:47 am

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.

latt

2005-01-20, 2:50 am

////////////////////// 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

latt

2005-01-20, 7:47 am

I am really sorry. I got it. It was my mistake.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com