Hi!
Im making a method=get form with checkboxes... the reason is that I want (!) the values to be visible in the URL..
<input type=checkbox name=my value=40 checked>
<input type=checkbox name=my value=50 checked>
<input type=checkbox name=my value=50 checked>
when submitted I do this in the .cgi:
@fields = split(",", $all);
... to split them up into separete $fields[x]..
Now, this is all good and the $fields gets populated with the correct values. The problem is when I start comparing those $fields with other variables I have.. ie:
they never match - even though I can see that they both have the same value - it never executes (the program doesnt see them as the same).
Is this due to some weird encode formatting reason or what is going on?
Really appreciate any help on this. Thanks
Im making a method=get form with checkboxes... the reason is that I want (!) the values to be visible in the URL..
Code:
<input type=checkbox name=my value=40 checked>
<input type=checkbox name=my value=50 checked>
<input type=checkbox name=my value=50 checked>
when submitted I do this in the .cgi:
Code:
$all = $in{'my'}; @fields = split(",", $all);
... to split them up into separete $fields[x]..
Now, this is all good and the $fields gets populated with the correct values. The problem is when I start comparing those $fields with other variables I have.. ie:
Code:
if ($fields[1] eq $banana) { jdjdjdjdjdjdjddj};they never match - even though I can see that they both have the same value - it never executes (the program doesnt see them as the same).
Is this due to some weird encode formatting reason or what is going on?
Really appreciate any help on this. Thanks