I am trying to code a contact form and received the error:
Parse error: syntax error, unexpected T_VARIABLE on line 6.
I have reached a dead end and would very much appreciate any help on this. I have scanned through and cannot find anything. I also have retyped it but to no prevail. The code is pasted below.
<?php
/*Email Variables*/
$emailSubject = 'CBC.php',
$webMaster = 'email address',
/*Data Variables*/
$name = $_POST['name'],
$email = $_POST['email'],
$phone = $_POST['phone'],
$comments = $_POST['comments'],
$body = <<<EOD;
<br><hr><br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http:contact form url">
<style type="text/css">
<!--
body {
background-color: #F4FFE4;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #5C743D;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thank You for contacting us. Your email will be answered as soon as possible.;
You will return back to the Contact Form in just a few seconds. </div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>