I've looked around and tried a few things but can't get this to work or find an answer.
I hold my forms on a website in an iframe as they need to ping an email via php to parse into our database. Problem is is the thank you message is just an html message within that frame.
I need when someone hits the submit button that the user is redirected to another main page. Not just in the iframe.
This is the end of the php:
// send email
$success = mail($email_to, $email_subject, $Body, "From: <$email_from>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=contact-sent-asc.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=URL=error.html\">";
}
?>
Instead of it going to URL=contact-sent-asc.html (which is in the iframe) I need it to redirect the main page and not the iframe.
Hope that makes sense. Any help would be appreciated!
Thanks, Iain