On Oct 4, Tony Frasketi said:
sub get_form_data_1 { my($hashRef) = @_; my($buffer) = ""; my($key,$value,$pair,@pairs);if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; }else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { my($key, $value) = split(/=/, $pair); $key = decodeURL($key); # Decode the key $value = decodeURL($value); # Decode the value%{$hashRef}->{$key} = $value;! # Enter the value in the hash <----- Deprecated stmtprint "get_form_data_1: Setting $key to [$value]<br>"; #Debug.... } }
Blech! Please, please, PLEASE use CGI.pm for your form-parsing needs. It's standard and it works, and it handles things like multiple-value select-boxes (which get_form_data_1() does not).
-- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://www.perlmonks.org/ % have long ago been overpaid? http://princeton.pm.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
