I'm not sure if this is the correct group, if not could you let me know which one is.
 
I have a problem getting the "Post" function to work in a Form. Below is my form and  a test screen to retrieve the environmental variables. My actual problem is trying to post form information to a text file. When I use "POST" the QUERY_STRING =  comes back blank. If I change to a "GET" function it works fine. I have tryed this using PWS with the form and program in the cgi-bin folder. I have also run this on my UNIX Host for my Lions Club Web Page. with the same results.
 
Can anyone tell me what I'm missing??
 
Below is the form and the Perl script:
 
FORM
<html>
<head><title>test of cgi</title></head
<body>
<form action="http://www.gigharborlions.org/cgi-bin/env.cgi" method="GET">
Enter some text:
<input type="text" name="sample_text" size=30>
<input type="submit"><p>
</form>
</body>
</html>
 
Script  (Note: when on UNIX the first line is #!/usr/bin/perl)
#!c:\perl\bin\perl
print "Content-Type: text/html\n\n";
 
print <<EndOfHTML;
<HTML><HEAD><TITLE>Print Environment</TITLE><?HEAD>
<body>
EndOfHTML
 
foreach $key (sort(keys %ENV)) {
print "$key = $ENV{$key}<br>\n";
}
print "</body></HTML>";

Reply via email to