Hey guys,
I am designing a enquiry form but don't have much experience so what i've done is got a piece of script of the internet and tried editing it to fit to purpose for the form, im doing it one step at a time but I keep getting this error message
'Parse error: syntax error, unexpected '<' in /home/a3652096/public_html/contact.php on line 3'
Heres the contact form code:
<?php
$field_name = $_POST['vh_name'];
$field_email = $_POST['vh_email'];
$field_message = $_POST['vh_message'];
$field_vhtypesize = $_POST['vh_typesize'];
$mail_to = 'exampl@example.com';
$subject = 'Message from a site visitor '.$field_name;
$body_message = 'Name: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Message: '.$field_message;
$body_message .= 'Vehicle Type & Size: .$field_vhtypesize;
$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 your enquiry. We will contact you shortly.');
window.location = 'contact_page.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to j.r_@plateline.co.uk');
window.location = 'contact_page.html';
</script>
<?php
}
?>
Any help would be much appreciated