form problem
Hi there,
I have a form on my website and it's been working great. However, i've just noticed it doesn't like certain emails, which results in missing emails being sent to me. Most of the time it's fine and the form works, usually if the email is spelt funny then i usually never receive the reply.
It would be greatly appreciated if someone could check my code to see if it looks ok and if i need to add anything, thanks.
Here is the code i'm using:
.......................
<style type="text/css">
<!--
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
-->
</style><?php
/* Subject and Email Variables */
$emailSubject = 'Bookings';
$webMaster = '. ';
/* Gathering Data Variables */
$name = $_POST['name'];
$email = $_POST['email'];
$phone= $_POST['phone'];
$location = $_POST['location'];
$guests = $_POST['guests'];
$date = $_POST['date'];
$month = $_POST['month'];
$year = $_POST['year'];
$event = $_POST['event'];
$message = $_POST['message'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Location: $location <br>
Number of guests: $guests <br>
Date: $date <br>
Month: $month <br>
Year: $year <br>
Type of event: $event <br>
Message: $message <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$sucess = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as html */
$theResults = <<<EOD
EOD;
echo "$theResults";
?>
