Pls help me... i want to create a contact form for my web site, but there is an error when i upload my web site to a server.
Parse error: parse error, unexpected T_VARIABLE in D:\inetpub\vhosts\elemac.net\httpdocs\newversion\contact.php on line 82
Here is my php,
<?php
// declare values
$name = $_POST['name'];
$email = $_POST['email'];
$handphone = $_POST['handphone'];
$fax = $_POST['fax'];
$address = $_POST['address'];
$zipcode = $_POST['zipcode'];
$city = $_POST['city'];
$email_subject = $_POST['emailsubject'];
$enquiry = $_POST['enquiry'];
$mydate = date ( 'l, F d Y g:i A',time()+240 );
// where to send e-mail to
$to = 'aaa@yahoo.com';
// e-mail subject
$subject = "Enquiry submitted from Contact Form";
// e-mail message
$message = "You have received a contact message:\r\n"
."----------------------------------------------------------------\r\n"
."Contact Name: $name\r\n"
."Submitted: $mydate\r\n"
."Hp / Telephone: $handphone\r\n"
."Fax: $fax\r\n"
."Address: $address\r\n"
."Zipcode: $zipcode\r\n"
."City: $city\r\n"
."Coutry: $country\r\n"
."Subject: $emailsubject\r\n"
."Enquiry: $enquiry\r\n"
$headers = "From: ".$email."\n";
."Reply-To: $email\n"
."X-Mailer: PHP/".phpversion();
// check for validation, then send the e-mail
if(empty($name) || empty($email) || empty($emailsubject) || empty($enquiry)) {
echo '...';
} elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
echo "ERROR: Please enter a valid e-mail address.";
} else {
mail( $to, $subject, $message, $headers );
echo "Message Sent!Dear $name,We will get back to you as soon as possible using $email.";
}
?>
ps: line 82:$headers = "From: ".$email."\n";
Very thank you if anyone can help.
Thanks in advance.
