I followed the suggestion in this post: How to read if a checkbox is checked in PHP?
I am trying to get values of checkboxes in form. I have tried separating the conditionals and using them together like this, checking isset and trying to get value. Either way it always returns "NO". What am I doing wrong?
if (isset($_POST['sign']) && $_POST['sign'] == 'yes-checked-sign') {
$check2 = "YES";
} else {
$check2 = "NO";
}
<input type="checkbox" name="sign" value = "yes-checked-sign" />