I have this contact form that won't send the email to me to let me know someone visited my site, where I'm I going wrong. Thanks. This is the test website in question.
<?php
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$field_email = test_input($_POST['email']);
$field_name = test_input($_POST['name']);
$field_residence = test_input($_POST['residence']);
$field_profession = test_input($_POST['profession']);
$field_club = test_input($_POST['fave_club']);
$field_message = test_input($_POST['message']);
$mail_to = 'idwapro2@gmail.com';
$subject = 'Message from vidz.dundaah visitor '.$field_name;
$body_message = 'E-mail: '."\n".$field_email."\n\n";
$body_message .= 'Name: '."\n".$field_name."\n\n";
$body_message .= 'Residence: '."\n".$field_residence."\n\n";
$body_message .= 'Profession: '."\n".$field_profession."\n\n";
$body_message .= 'Fave_club: '."\n".$field_club."\n\n";
$body_message .= 'Message: '."\n".$field_message;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = 'From: '.$field_name."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
header("Location:../contact.html");
?>