Hi,
I am not able to get my email form working. Can anyone help me? I am using Expression Web 4. I am trying to make it work for a Linux Server. This is my email processor code:
<?php
$to = 'example@example.com';
$subject = $_POST['phoneNumber'];
$header = $_POST['email'];
$message = "From: $fullname\nSender email address: $header\nRegarding: $subject\n\nMessage:\n$comments\n';
if ($header=="") {
echo "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
exit;
}
$success = mail ($to, $subject, $message, "From: <$header>");
if ($success) {
echo "<meta http-equiv=\"refresh\" content=\"0;URL=success.html\">";
}
else {
echo "<meta http=equiv=\"refresh\" content\"0;URL=failure.html\">";
}
?>
I keep getting the error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/n/j/x/njxc500/html/Pages/Contact/emailProcessor.php on line 9
Any help would be great!
Thanks