In the following php script Dreamweaver is giving me a syntax error every time I add the redirect header:
header('Location: thankyou.htm');
The info is sent to my email address with no problem but the client is not redirected to the thankyou.htm page. Does not matter whether or not I enter the full url. Sincerely appreciate any help. Please keep explanation simple – THANK YOU!!
PLEASE SEE BELOW…
<?php
$senderName = $_POST['name'];
$senderEmail = $_POST['email'];
$sendToEmail = "wildlifeart@heathersoos.ca";
$emailMessage = $_POST['message'];
$recipient = "$sendToEmail";
$headers = "From: $senderEmail ";
$message = "From: $senderName, \nEmail Address: $senderEmail\nMessage: $emailMessage";
$message = StripSlashes($message);
mail($recipient, "Heather's Artwork", $message, $headers)
header('Location: thankyou.htm');
?>
You are missing a semicolon (
;) at