hey, i dunno why thats not working but anyway ive got a subroutine that'l make life alot easier for you...
sub read_input
{
local ($buffer, @pairs, $pair, $name, $value, %FORM);
$ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
if ($ENV{'REQUEST_METHOD'} eq "POST")
{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
} else
{
$buffer = $ENV{'QUERY_STRING'};
}
# Split information into name/value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%(..)/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
%FORM;
}
now all thats left to is use it:
my %query = &read_input;
so say your form had a textbox called "email" you use:
$query{email}
to get whatever the submitter entered, also it will automatically fix up any special characters sent into the form.
Hope it works for you!!