Maybe I'm missing the obvious here...
I have a form with a textbox like:
<input type=text name=box size=1 maxlength=1>
When this form is posted to a receiving script, I have two options to test for an answer. 1, 'if($box)', and 2, 'if(isset($box))'.
The problem is, if I use test 1, and the user enters '0' (zero), the test fails, because $box = 0, or FALSE. If I use test 2, it always evaluates to TRUE because $box, by virtue of having been posted, even with no entry by the user, is set. So it is difficult to tell if the user did not enter anything in the textbox or if they entered '0'.
I need to distinguish between 'no answer given' (an empty submission), '0' (zero) or some other answer '[0-9]'. How can I do this?
Thanks,