Hi,
I am using the param method to retrieve form data. I have a checkbox
field called user_status which has three values: Active, Inactive and
Deleted.
If all three boxes are checked and the form is submitted, the user_status
field is returned by the param method three times. This seems redundant and
am wondering if this was intended or a bug.
Apache 2.2.3
mod_perl 2.0.2
libapreq 2.0.8
Thanks,
Ted
Code looks like this:
--------------------
my $ar = Apache2::Request->new($r);
foreach $key ($ar->param()) {
if ($key eq 'user_status') {
warn "$key\n";
foreach ($ar->param($key)) {
warn "-- $_\n";
}
}
}
Output looks like this:
----------------------
user_status
-- Active
-- Inactive
-- Deleted
user_status
-- Active
-- Inactive
-- Deleted
user_status
-- Active
-- Inactive
-- Deleted