Checkbox query
| From: | Ryan A | Date: | Thu, 15 May 2003 20:36:04 +0000 |
| Subject: | Checkbox query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-147797@lists.php.net to get a copy of this message | ||
Hi,
I am sending some values from a form and am using checkboxes...I have set it
so if the checkbox is checked its value is "1".
How do i set the "unchecked" value?
can i set it in the first place?
If its not checked what is usually the value?
i tried this:
if($bandwidth=="")
{$bandwidth=0;}
and this below:
if (!is_numeric($bandwidth)) {echo '1An error has occoured'; exit;}
and it always shows me: 1An error has occoured
if the box is unchecked.
What am i doing wrong?
Kindly reply,
-Ryan