When I test my contact form at my webpage, instead of sending
the email, it redirects to the php form I'm using when I click the
"send" button. For the properties, I have it set as this for the
form: "Action:ESFContactForm.php, Method:POST."
Here's my php code...I changed some info to keep things
private for my client:
<?php
/* Subject and Email variables */
$emailSubject = '';
$webMaster = 'name@site.com';
/* Gathering Date Variables */
$nameField = $_POST['name'];
$biznameField = $_POST['bizname'];
$addressField = $_POST['address'];
$cityField = $_POST['city'];
$stateField = $_POST['state'];
$zipcodeField = $_POST['zipcode'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$commentsField = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Your Name: $name <br>
Business Name: $bizname <br>
Street Address: $address <br>
City: $city <br>
State: $state <br>
Zip: $zipcode <br>
Phone: $phone <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>Titled Added Here</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #BCBCBC;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your
email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>