Problems with If & Ifelse

I’m having a problem with if and else at the moment, basically there are three outcomes of the form; eligable for group a , eligable for group b, not eligeble. the eligibility fo groups is based on one question but I can’t get else if for work!!

any Ideas?

[php]
if (($a == “Yes”) && ($b == “No”) && ($c == “No”) && ($d == “Yes”) && ($e == “No”) && ($f == “No”) && ($g == “Yes”) && ($h == “Yes”) && ($i == “Yes”) && ($j == “No”))

print ("

Case is Eligible - Assign to Workshop Group

");
$group = "Case is Eligible - Assign to Workshop Group ";
} elseif	($a== "Yes") && ($b == "No")  && ($c == "No") && ($d  == "Yes") && ($e == "No") && ($f == "No") && ($g  == "Yes") && ($h== "Yes") && ($i == "No") && ($j == "No")) 
				print (" <center><h3>Case is Eligible – Assign to Control Group </h3></center>"); 														
		  					$group = "Case is Eligible – Assign to Control Group";	

		} else {											
		  		print (" <center><h3>Case is NOT Eligible </h3></center>"); 
						$group = "Case is NOT Eligible "; 
		} 	
						 }	   		[/php]

you left off the ( on the elseif in front of the a == "yes’

Theres no opening { for your first if statemnt but there is a closing one before the elseif

Thanks guys!!!

Did that solve it? If so, we will mark it so… If not repost the new code…

Sponsor our Newsletter | Privacy Policy | Terms of Service