Re: How do I check if a checkbox has been checked?
| From: | John Nichel | Date: | Fri, 01 Nov 2002 15:51:49 +0000 |
| Subject: | Re: How do I check if a checkbox has been checked? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122430@lists.php.net to get a copy of this message | ||
if ( isset ( $_POST['shipper_save'] ) ) {
echo ( "It's Checked" );
}
Or use $_GET['shipper_save'] depending on your forum method.
DonPro 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