The syntax as I have used it is (not the cleanest or best way to do
it by a long run - but it works):
<?php
if ($_POST['shipper_save'] == "off") {
$shipper_save = "";
}
else {
$shipper_save = "checked";
}
?>
<input type="checkbox" name="shipper_save" <?=$shipper_save?>>
this will have the checkbox be checked by default, also you can do what
ever other things you need to do based on the on/off conditions.
On Fri, 1 Nov 2002 10:47:43 -0500
"DonPro" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a form with a checkbox like so:
> <input type="checkbox" value="ON" name="shipper_save">
>
> When I submit, the value is always shown as "ON" regardless of whether
> I've checked the checkbox or not. So this begets the question, How
> can I code my PHP form processing script to determine whether the
> checkbox was checked?
>
> Thanks,
> Don
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Tom Woody
Systems Administrator
NationWide Flood Research, Inc.
phone: 214-631-0400 x209
fax: 214-631-0800
Don't throw your computer out the window,
throw the Windows out of your computer!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php