blackhataffiliate
Senior Member
- Oct 19, 2008
- 847
- 1,372
Okay, here is a basic contact form. I keep getting the following parse error. I know it is something simple, but I cant find it. Can some one please help me figure this out, it is driving me crazy.
Error is Parse error: syntax error, unexpected '@' in............contact/sendmail.php on line 16
Error is Parse error: syntax error, unexpected '@' in............contact/sendmail.php on line 16
Code:
<?php
if(isset($_POST['submit'])) {
$to = "email";
$subject = "Contact Form Results";
$name_field = $_POST['sender_name'];
$email_field = $_POST['sender_email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
else {
echo "Thank you for contacting us. Please allow up to 48 business hours for a reply!";
}
?>