I have a form with a few checkboxes in it - they are all type="checkbox" but each set has its own name/id. The php file works fine but if the user does not select a check box, the return email just leaves the [$nameofcheckbox] area empty..
I would rather have the email reflect that this or that checkbox was not used EG: No (Right now if a user checks the box, the email has the checkbox as Yes, but if not... empty - Rather it say No)
I've tried this:
///Checkbox Setups----------------
$yes = $no = "";
if (isset( $_POST['checkbox']))
{ ${$_POST['checkbox']} = "checked";} else {$yes = "checked";}
it actually works with radio butoons but not with checkboxes - any pointers on how I could accomplish this?
Thanks to all.........
I would rather have the email reflect that this or that checkbox was not used EG: No (Right now if a user checks the box, the email has the checkbox as Yes, but if not... empty - Rather it say No)
I've tried this:
///Checkbox Setups----------------
$yes = $no = "";
if (isset( $_POST['checkbox']))
{ ${$_POST['checkbox']} = "checked";} else {$yes = "checked";}
it actually works with radio butoons but not with checkboxes - any pointers on how I could accomplish this?
Thanks to all.........