Hello:
I just experienced the same problem as you.
I fixed it by changing the parse form code.
sub parse_form {
$query=$ENV{'QUERY_STRING'};
if ($query) { @pairs=split(/&/,$query); }
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
}
foreach $pair (@pairs) {
$something_in=1;
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if ($INPUT{$name}) { $INPUT{$name} = $INPUT{$name}.",".$value;
+ }
else { $INPUT{$name} = $value; }
}
}
Now we want to put the checkbox list into a array.
@users = split(/,/,$INPUT{'users'});
To print out all the values for the checkboxes that are checked,
foreach $userss (@users) {
print <<EOF;
$userss<br>
EOF
}
Hope this helps,
Anthony
|