KyussRyn has asked for the wisdom of the Perl Monks concerning the following question:
<form method="post" action="../bin/testLoginData.pl" enctype="multipar +t/form-data">
#!c:\Perl\bin\perl use warnings; use parse_data_both; use GUI; use CGI; use constant USERNAME_TEST_PASS => 42; my $q = CGI->new; &DataHandler::parse_form_data (*simple_form);
Thank you in advance for any help you can offer#!c:\Perl\bin\perl use warnings; package DataHandler; $webmaster = 'admin@zixsys.com'; use constant USERNAME_TEST_PASS => 42; sub parse_form_data { print "Content-type: text/plain", "\n\n"; local (*FORM_DATA) = @_; local ( $request_method, $query_string, @key_value_pairs, $key_value, $key, $value ); print "Run Test", "\n"; $request_method = $ENV{'REQUEST_METHOD'}; print "The data sent to FORM_DATA is:", @_, "\n"; if ( $request_method eq "GET" ) { $query_string = $ENV{'QUERY_STRING'}; print "GET query_string is:", $query_string, "\n"; } elsif ( $request_method eq "POST" ) { read( STDIN, $query_string, $ENV{'CONTENT_LENGTH'} ); print "POST query_string is: ", $query_string, " and the length is: $ENV{'CONTENT_LENGTH'}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with read( STDIN, $query_string, $ENV{'CONTENT_LENGTH'} );
by mr_mischief (Monsignor) on Dec 20, 2010 at 05:58 UTC | |
|
Re: Problem with read( STDIN, $query_string, $ENV{'CONTENT_LENGTH'} );
by chromatic (Archbishop) on Dec 20, 2010 at 06:32 UTC | |
by KyussRyn (Acolyte) on Dec 21, 2010 at 02:00 UTC |