I am having a bit of trouble. I set up a form (well, I copied and pasted code from another guy http://www.templatemonster.com/help/how-create-contact-form-html.html) to send me an email when someone hits submit, and I keep getting the following error:
Parse error: syntax error, unexpected T_STRING in /home1/USERNAME REMOVED/public_html/index_files/contact.php on line 19
A copy of the contact.php minus my email is here:
<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];
$mail_to = 'EMAIL REMOVED';
$subject = 'Message from a site visitor '.$field_name;
$body_message = 'From: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Message: '.$field_message;
$headers = 'From: '.$cf_email."\r\n";
$headers .= 'Reply-To: '.$cf_email."\r\n
$mail_status = mail($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'WEBPAGE REMOVED';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to EMAIL REMOVED');
window.location = 'WEBPAGE REMOVED';
</script>
<?php
}
?>
Thanks in advance for the help, and sorry for being an idiot. I made the webpage from publisher. 🙂