Can I get some php help?
Hello Everyone.
I have created a contactUs.html page in dreamweaver. I created a .php form as well and both are setting on the server.
I created a form in Dreamweaver, put in text fields and gave them their respective ids (name, email, phoneNumber, comments) they are exactly the same ids that I use in the php.
Everything looks ok. I have uploaded everything to the server.
When I test it and click on the submit button everything seems to work correctly. However, I never get the email. I've set up the .php to email me the contents of the form.
I've created a handful of contact us pages and they all work except this one.
I've been banging my head against the keyboard all day trying to figure it out. I finally gave up and decided to ask for some help here.
Thanks in advance.
You can visit the contact us page here.
http://www.dentempire.com/pages/contactPage.html
-Drew
(.php code is below.)
<?php
/* Email Variables */
$emailSubject = 'contactformprocess!';
$webMaster = 'email@drewwimages.com';
/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$phoneNumber = $_POST['phoneNumber'];
$comments = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <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="4;URL=http://www.dentempire.com">
<style type="text/css">
<!--
body {
background-color: #444;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Your email will be answered as soon as possible! <br />
You will be redirected back to Dent Empire in 4 seconds.
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>