I am trying to add multiple scenarios for when my site visitor submits a form. Right now we have 4 dropdown questions. There will be 3 scenarios:
1. Answer all 4 yes, get redirected to success page.
2. Answer any of the questions no, get redirected to 'did not qualify' page.
3. Answer the military question 'yes' no matter what the other answers are and be redirected success page.
Unfortunately, I can't get the 3rd scenario working. Code is below:
mail($to, $mailsubject, $body, $header);
if($Q1=='yes' && $Q2=='yes' && $Q3=='yes' && $Q4=='yes')
{
header('Location: http://ift.tt/1FFpOWl');
}
if($Q3=='yes')
{
header('Location: http://ift.tt/1FFpOWl');
}
if($Q1=='no' || $Q2=='no' || $Q3=='no' || $Q4=='no' )
{
header('Location: http://ift.tt/1EbXoUW');
}
enter code here
}
?>
Thank you!
Aucun commentaire:
Enregistrer un commentaire