Guest_imported
New member
- Jan 1, 1970
- 0
can anyone please tell me what is wrong with this script? I have staired at it for more than an hour and it looks like it sould work to me, but when I go to the page it will only direct me to the "one" page and not any of the other pages when I select "two" or "three"
#!/usr/bin/perl
#print "Content-type:text/html\n\n";
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$buffer);
foreach $pair(@pairs)
{
($name,$value)=split(/=/,$pair);
$value=~tr/+//;
$value=~s/%([a-fA-f0-9][a-fA-f0-9])/pack("C",hex($1))/eg;
$FORM{$get_page}=$value;
}
#require "cgi-lib.cgi";
#&ReadParse(*input);
#$uname= $input{'get_page'};
if ($get_page eq "one"
{
print "Location:}
elsif ($get_page eq "two"
{
print "Location:}
else {
print "Location:}
#!/usr/bin/perl
#print "Content-type:text/html\n\n";
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$buffer);
foreach $pair(@pairs)
{
($name,$value)=split(/=/,$pair);
$value=~tr/+//;
$value=~s/%([a-fA-f0-9][a-fA-f0-9])/pack("C",hex($1))/eg;
$FORM{$get_page}=$value;
}
#require "cgi-lib.cgi";
#&ReadParse(*input);
#$uname= $input{'get_page'};
if ($get_page eq "one"
print "Location:}
elsif ($get_page eq "two"
print "Location:}
else {
print "Location:}