On one of my pages if both checkboxes are checked this error message will show up: if ($_POST['promote']['multicity_co'] && $_POST['promote']['multicity_cf']) $err .= "• please, select only ONE paid promotion<br>"; Code (markup): My question is, what code should I use to give an error message if NONE of the checkboxes are checked? Thank you in advance.
You can use isset function to check whether variable is set or not for the checkboxes when you dont check $_POST wont read variable so you should use isset function