Hi
I'm new to PHP but i scripted a contact form on my website that has all the normal fields name, email address etc. But the emails that i recieve from the form appear blank except for the field names so something like
Name:
Email:
Message:
Mailinglist:
I've looked at the scripting and I can't see anything wrong can someone help me?
This is the code:
<?php
/*Subject and Email Variables*/
$emailSubject = 'New Form Entry';
$webMaster = 'rolladome@btinternet.com';
/*Gathering Data Variables*/
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$phoneField = $_POST['phone'];
$messageField = $_POST['message'];
$mailinglistField = $_POST['mailinglist'];
$body = <<<EOD
Name: $name <br>
Email Address: $email <br>
phone: $phone <br>
Message: $message <br>
Mailing List: $mailinglist
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>
<meta http-equiv="refresh" content="3;URL=http://www.rolladome.org.uk/contact.html">
<title>Message Sent!</title>
<style type="text/css">
<!--
.style2 {
font-size: medium;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #000000;
}
-->
</style>
</head>
<body>
<p align="center" class="style2">Thank you for your interest, Your email will be answered very soon!</p>
<p align="center" class="style2">you will be returned to the RollaDome Website in a few seconds....</p>
</body>
</html>
EOD;
echo "$theResults";
?>