I have ran into a problem with my php file that processes my contact form. Simply put, I cannot get the form to show up in my email.
Here is the code for the form process:
Code: Select all
<?php
/* Subject and email variables */
$emailSubject = 'Contact from Website';
$webMaster = 'zack.maxwell@ad-vancemedia.com';
/* gathering data variables */
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$messageField = $_POST['message'];
$body = <<<EOD
<br><hr><br>
Name: $nameField <br>
Email: $emailField <br>
Message: $messageField <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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="refresh" CONTENT="3;URL=http://www.packingandshippingstore.com/test/">
<title>Thanks for your contact!</title>
</head>
<body>
<br>
<p><h3>Your information had been successfully sent!</h3></p>
<br>
<p>Thank you for contacting the Packing & Shipping Specialists</p>
<br>
<p>You are about to be redirected to our <b>home</b> page.</p>
</align>
</body>
</html>
EOD;
echo "$theResults";
?>Here is the html for the form:
Code: Select all
<div id="contact">
<form id="contact" name="contact" method="post" action="formprocess.php">
<table>
<tr>
<td><label for="firstname">name</label></td>
<td><input type="text" name="firstname" id="firstname" /></td>
</tr>
<tr>
<td><label for="email">email</label></td>
<td><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td><label for="message">message</label></td>
<td><textarea name="message" id="message"></textarea></td>
</tr>
<tr>
<td></td>
<td align="right"><input name="submit" type="submit" class="submit" value=" Submit " id="submit" /></td>
</tr>
</table>
</form><!---end form--->
</div><!---end contact form--->~Z