Jump to content

Verify if checkboxes are checked?


lindm

Recommended Posts

When checkboxes are checked your browser will include it in the $_POST data (or $_GET date depending on your forms submit method).

 

So just check to make your checkbox field exists eg:

 

if(isset($_POST['chk_box_name']) && !empty($_POST['chk_box_name']))
{
    echo 'chk_box_name was checked!';
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.