How to read if a checkbox is checked in PHP?

Solution for :How to read if a checkbox is checked in PHP?

If our HTML page looks like this:


After submitting the form we can check it with:

isset($_POST['checkbox1'])

OR

if ($_POST['checkbox1'] == 'value1'){ 

//I am checked.

}

No comments:

Post a Comment