You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Eamon Daly <ea...@fastweb.com> on 2000/06/20 16:48:12 UTC
Bizarre munging of form data
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
Re: Bizarre munging of form data
Posted by Ged Haywood <ge...@jubileegroup.co.uk>.
Hi there
On Tue, 20 Jun 2000, Eamon Daly wrote:
> 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".
Well it's a bit off-the wall, but the letters WHORE could conceivably
(sorry:) be munged by some kind of political correctness enforcer.
As a test, try putting some other salacious material in your forms?
73,
Ged.