Death on Wheels
10-13-2000, 10:00 PM
OK. Go to http://airlines.flightsimming.com/wabash
Submit the form, and you will get an error message regarding the HTTP headers not being returned. The following is my redirect script:
#Parses the form data
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{$name} = $value;
}
#Prints appropriate header for page requested
if ($FORM{$NavBar} eq "blank"){
print 'Location: http://airlines.flightsimming.com/wabash/default.htm\n\n';
}
elsif ($FORM{$NavBar} eq "apply"){
print 'Location: http://airlines.flightsimming.com/wabash/apply.htm\n\n';
}
elsif ($FORM{$NavBar} eq "roster"){
print 'Location: http://airlines.flightsimming.com/wabash/roster.htm\n\n';
}
else {
print "Content-type: text/html\n\n";
print "Howdy";
print "$FORM{$NavBar}";
}
It is a Win2K host with IIS 5.0, in case you're interested. Basically, what it does is it checks the value of the drop-down list submitted to it and prints the appropriate location header for the redirect. Apparently, the cause of my problem is because when the form is submitted and processed by the script, NavBar (the drop down list box) has no value. I know this because of the output (or lack thereof) of the last few lines. NavBar is the correct name as specified in the HTML page.
CGI.PM is NOT an option.
------------------
Kurt Weber
Shell scripts? Shell scripts? We don't NEED no stinkin' shell scripts!
[This message has been edited by Death on Wheels (edited 13 October 2000).]
Submit the form, and you will get an error message regarding the HTTP headers not being returned. The following is my redirect script:
#Parses the form data
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{$name} = $value;
}
#Prints appropriate header for page requested
if ($FORM{$NavBar} eq "blank"){
print 'Location: http://airlines.flightsimming.com/wabash/default.htm\n\n';
}
elsif ($FORM{$NavBar} eq "apply"){
print 'Location: http://airlines.flightsimming.com/wabash/apply.htm\n\n';
}
elsif ($FORM{$NavBar} eq "roster"){
print 'Location: http://airlines.flightsimming.com/wabash/roster.htm\n\n';
}
else {
print "Content-type: text/html\n\n";
print "Howdy";
print "$FORM{$NavBar}";
}
It is a Win2K host with IIS 5.0, in case you're interested. Basically, what it does is it checks the value of the drop-down list submitted to it and prints the appropriate location header for the redirect. Apparently, the cause of my problem is because when the form is submitted and processed by the script, NavBar (the drop down list box) has no value. I know this because of the output (or lack thereof) of the last few lines. NavBar is the correct name as specified in the HTML page.
CGI.PM is NOT an option.
------------------
Kurt Weber
Shell scripts? Shell scripts? We don't NEED no stinkin' shell scripts!
[This message has been edited by Death on Wheels (edited 13 October 2000).]