I've just run into the strangest problem I've ever had the
misfortune of coming across. I have a form containing a
number of various fields, including two radio buttons named
"WHO_REGISTERED". Here's the code that parses the data and
puts it into a hash:
sub get_input {
my $apr = Apache::Request->new(shift);
my $inputref = shift;
foreach my $param ( $apr->param ) {
push @{ $inputref->{$param} }, $apr->param($param);
}
}
For some reason, sometimes (not always, but /sometimes/)
$param magically comes out as " _ GISTERED".
Our site has /thousands/ of forms, and it's only this one
variable by this particular name that wigs out like this.
It's the weirdest darn thing. I've put in hack code like:
$param =~ s{^ _ GISTERED$}{WHO_REGISTERED};
above, and everything now seems to work just fine. I just
don't get it.
For completeness, I'll include the relevant HTML block:
<tr>
<td width="25%" align=left valign=top>
<b>Are you a parent filling this profile out for your child?</b><br>
<small><font color="#0000FF">MANDATORY</font></small>
</td>
<td> </td>
<td align=left valign=top>
<input type="radio" name="WHO_REGISTERED" value="Parent" checked>Yes<br>
<input type="radio" name="WHO_REGISTERED" value="Student" >No
</td>
</tr>
Maybe I'm just an idiot and am overlooking something
simple. If anyone can catch the problem or suggest ways I
can debug this behavior, I'm all ears.
________________________________________
Eamon Daly
FastWeb, Inc.
847 568 6410