in reply to How do I check if checkbox in the form was checked or not?
Second, you need to make sure you specify a value for the checkbox if you really want to be able to see if it is checked.
Eg: <INPUT TYPE=CHECKBOX NAME="MyBOX" VALUE="on">
Code:
if($cgi->param('MyBOX') eq 'on'){ #Do whatever }else{ #... }
This should also work:
if($cgi->param('MyBOX')){ #Do whatever }else{ #... }
But the first is a little more paranoid.
Hope this helps...
|
|---|