> Russ Fineman wrote:
> 
> 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??

When using POST method, the form args normally come from STDIN (although 
you can also have args in QUERY_STRING if you specify them after a ? on 
the ACTION tag).  So you have to read STDIN to get normal POST args.

read (STDIN, my $buffer, $ENV{'CONTENT_LENGTH'}) if ($ENV{'REQUEST_METHOD'} eq 'POST');

should get your args into $buffer.  CONTENT_LENGTH tells how many bytes 
there are on STDIN to read.  I usually append a '&' and the contents of 
QUERY_STRING to $buffer to get all of the args in one place.

-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //      http://dbecoll.webjump.com/ (Free Perl site)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to