PHP Mail Handler
Posted: Mon Oct 03, 2011 11:54 am
i have a problem with this php mail handler. what is wrong with this code?
Code: Select all
<?php
$emailSubject = 'PowerTech';
$webMaster = 'someone@domain.com'
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$phoneField = $_POST['phone'];
$messField = $_POST['mess'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Phone Number: $phone <br>
Comments: $mess <br>
EOD;
$headers = "From: $email \r\n";
$headers .="Content-type: text/html \r\n";
$success = mail($webMaster, $emailSubject, $body, $headers)
$theResults = <<<EOD
<p>success
<a href="index.php">click here</a> to homepage
</p>
EOD;
echo "$theResults";
?>