Ive just designed my first contact form for my website so people can sign up to sell tickets to the event but when i click submit on the form it goes to a new page and says theResults all its meant to do is have a little box pop under neath submit sayin the success message. I am also receiving a email from the contact box but all it has in the email is the headers without any of the information.
I don't understand why this is happening i will post the php code if anybody could edit it so its right or tell me what i need to do to fix it this will be great.
RegardsPHP Code:<?php
/* Subject and Email Variables */
$emailSubject = 'Insomnia All Ages Promoters';
$webMaster = 'aaron@superbsoundentertainment.com';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$mobileField = $_POST['mobile'];
$schoolField = $_POST['school'];
$dobField = $_POST['dob'];
$addressField = $_POST['address'];
$whyField = $_POST['why'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Mobile: $mobile <br>
School: $school <br>
DOB: $dob <br>
Address: $address <br>
Why: $why <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>JakesWorks - travel made easy-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for signing up! We will be in contact with you very soon! Kind regards the team at Superb Sound Entertainment</div>
</div>
</body>
</html>
EOD;
echo "theResults";
?>
Aaron


Reply With Quote
Bookmarks