Ah gracious monks,
I must be missing something, but I 've had a look around and can't find anything on this. I'm trying to read the value of a checkbox on a form. When it's checked, I can print out the value, but when I uncheck it and re-submit, I don't have a value.
The plan was to hold this value (along with a few others) in a cookie so that I can correctly default settings on the page.
The question is, how do I find the value of an unchecked box?
Thanks.
#!c:\perl\bin\perl -w BEGIN { $|=1; use CGI::Carp('fatalsToBrowser'); } use strict; use CGI qw(:standard); my $x = new CGI; print $x->header; print param('TB'); print <<EOF; <form method="POST" action="temp.pl"> <p> <input type="checkbox" name="TB" value="ON" checked=0> check</p> <p> <input type="submit" value="Refresh" name="BRef"></p> </form> EOF ;
Awkmonk - dipping his toe in the Ocean of Perl.
In reply to CGI parameters are not set by awkmonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |