Forum Moderators: coopster
<input type="checkbox" name="mycheckbox" value="1" />
If the checkbox has been ticked php will see $_POST['mycheckbox'] as having the value 1. If it hasn't been checked then PHP won't even know it exists. You normally use isset($_POST['mycheckbox']) to see whether a box has been ticked or not.
<?PHP
# form processing
$mycheckbox = (isset($mycheckbox) && $mycheckbox == "on") ? 1 : 0;
?>