Hi all, I’m a total beginner in PHP, Basically I want to make an order form and when buyer click the submit button, they’ll see thank you message displayed on their web browser and an order confirmation is sent to their email as well.
I’ve made two 2 email formats, $theResults will be displayed on web browser after buyer click the submit button and $theReply will be sent to their email address, but I’m seeing this error message http://www.crystalashley.co.nz/order-form/contactformprocess-edit.php , does anybody know what’s wrong with my code? please helpp…Thanks a lot
[php]<?PHP
/* SUBJECT AND EMAIL VARIABLE */
$emailSubject = ’ crystal ashley order form - squares ';
$webMaster = '[email protected], [email protected] ';
/* gathering data variable */
$emailField = $_POST['email'] ;
$nameField = $_POST['name'] ;
$phoneField = $_POST['phone'] ;
$codeField = $_POST['code'] ;
$quantityField = $_POST['quantity'] ;
$hearField = $_POST['hear'] ;
$classField = $_POST['class'] ;
$commentsField = $_POST['comments'] ;
$body = <<<EOD
Email : $email
Name : $name
Phone : $phone
Code : $code
Hear from : $hear
Interested in : $class
Comments : $comments
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
$theReply = <<<EOD
crystal ashley form
EOD;
$headers = “From : $webMaster\r\n”;
$headers = “To : $recipient\r\n”;
$headers .= “Content-type: text/html\r\n”;
$success = mail($recipient, $emailSubject, $theReply, $headers);
echo “$theResults”;
?>
[/php]