I am trying to add an If/Then statement to direct to a particular URL if certain answers are giving in a form.
I am putting this at the very end of the PHP code, if anybody can help me with this, I would greatly appreciate it. The form is collecting information, dumping it to a TXT file, then emailing the results. Everything works fine and currently after it completes, goes to a URL, but I would like to have it redirect to different URLs based on the answer to a particular question.
Here is the code I have tried, just based on Googling, I am fairly new to PHP, so I am not quite sure what I am doing wrong. Any help would be greatlly appreciated.
}
if ($eclub == "Yes"){
header('location:[url]http://www.URL1.com);[/url]
} else{
header('location:[url]http://www.URL2.com);[/url]
}
?>