I can't understand why, having submitted a form which dispatches a couple of emails successfully, it fails to redirect to the page I have requested.
Could someone please point out where I have gone wrong here.
As I say, the emails are successfully sent, but the browser does not move to the page entered in the header, but goes blank, with the address bar showing the same address as brought me to this email/form page.
Thanks
Could someone please point out where I have gone wrong here.
PHP:
// The emails:
if(mail("aa@bb.com", "Feedback", $message, "From: Dart Valley Writers")
&& mail("noone@nowhere.com", "Feedback Alert", $inform_me, "From: Dart valley writers"))
{
header('location: [URL unfurl="true"]http://www.dartvalleywriters.org.uk/email_redirect.php');//[/URL] redirect to page if email has been successfully sent
exit;
}else{
$error == '<p style="color:red;">An error occured, your email could not be sent. Please try
again</p>';
}
}
?>
As I say, the emails are successfully sent, but the browser does not move to the page entered in the header, but goes blank, with the address bar showing the same address as brought me to this email/form page.
Thanks