Log in

View Full Version : Checked / unchecked error messages



qwikad.com
11-26-2012, 06:16 AM
On one of my pages if both checkboxes are checked this error will show up:





if ($_POST['promote']['multicity_co'] && $_POST['promote']['multicity_cf'])
$err .= "&bull; please, select only ONE paid promotion<br>";



My question is, what code should I use to give an error message if NONE of the checkboxes are checked?

Thank you in advance.

bernie1227
11-26-2012, 06:25 AM
I assume you could use something like this:


if (!isset($_POST['promote']['multicity_co']) && !isset($_POST['promote']['multicity_cf']))
$err .= "&bull; please, select a paid promotion<br>";