Hi, I've written this piece for somebody for their contact page and
after debugging it I was still receiving an error on line 40.
Only line 40 is the closing PHP tag ?>.
I would really appreciate any help.
Thanks,
Panos A.
<?php
// EDIT THE VARIABLES BELOW...
$compName="Your Company name";
$myWsite="http://www.mywebsite.com";
$webSite="MYWEBSITE.COM";
$toMe="name@domain.com";
$subject="New email from my website!";
// Message for the autoresponding email sent to the customer...
$autoRmessage="Thanks for your inquiry with us. We will get back to you as soon as possible.";
//After they send the info tell them...
$thanks="Your message was sent. Thank you!";
// STOP EDITING /////////////////////////
$Comment = stripslashes($Comment);
$msgBody = 'First Name: ' . $FirstName . '\r\n\Last Name: ' . $LastName . '\r\n\Phone Number: ' . $PhoneNumber . '\r\n\E-mail: ' . $Email . '\r\n\Fax: ' . $Fax . '\r\n\Interest: ' . $Interest . '\r\n\Channel: ' . $Channel . '\r\n\Why Yoga: ' . $Why_yoga . '\r\n\Address: ' . $Address . '\r\n\Comment: ' . $Comment . '\r\n\';
$toCustomer = $Email;
$sig = "\n********************************************************\n";
$sig .= $compName . "\r\n";
$sig .= $myWsite;
$printConf = "<HTML><HEAD><TITLE>Processing Form</TITLE></HEAD><BODY BGCOLOR=#D5D5AB>" . $thanks . "</body></html>";
$autoRmessage .= $sig;
$message .= $sig;
$headers = "From: " . $compName . "<$toMe>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1";
if ($GLOBALS[SERVER_ADMIN]) $headers .= "\r\nX-AntiSpam: Server Administrator " . $GLOBALS[SERVER_ADMIN] . "\n";
$headers .= "\r\X-mailer: " . $webSite . "PHP/EMAIL\n";
mail($toMe, $subject, $msgBody, $headers);
mail($toCustomer, $compName, $autoRmessage, $headers);
echo $printConf;
?>