Hi,
How would I deal with mixture of radio buttons, checkbox values? At the moment I have this code:
PHP Code:
if(isset($_POST['genconsent'], $_POST['photo'], $_POST['mon'], $_POST['moncare'], $_POST['tue'], $_POST['tuecare'], $_POST['wed'], $_POST['wedcare'], $_POST['thur'], $_POST['thurcare'], $_POST['fri'],$_POST['fricare'],$_POST['mon2fri'], $_POST['t-shirt'],$_POST['church'],$_POST['mailout'],$_POST['wom'],$_POST['letterbox'],$_POST['newspaper'],$_POST['internet'],$_POST['school'],$_POST['other'])){
$genconsent = "Y";
$photo = "Y";
$mon = "Y";
$moncare = "Y";
$tue = "Y";
$tuecare = "Y";
$wed = "Y";
$wedcare = "Y";
$thur = "Y";
$thurcare = "Y";
$fri = "Y";
$fricare = "Y";
$mon2fri = "Y";
$tshirt = "Y";
$church = "Y";
$mailout = "Y";
$wom = "Y";
$letterbox = "Y";
$newspaper = "Y";
$net = "Y";
$school = "Y";
$other = "Y";
}else{
$genconsent = "N";
$photo = "N";
$mon = "N";
$moncare = "N";
$tue = "N";
$tuecare = "N";
$wed = "N";
$wedcare = "N";
$thur = "N";
$thurcare = "N";
$fri = "N";
$fricare = "N";
$mon2fri = "N";
$tshirt = "N";
$church = "N";
$mailout = "N";
$wom = "N";
$letterbox = "N";
$newspaper = "N";
$net = "N";
$school = "N";
$other = "N";
}
If set the value = "Y" else value = "N" . However, this method won't work if this is a mixtures of yes and no values. How would I retrieve the actual checkbox or radio button values so I can assign them to the above variables?
Thanks,
Nightwalker