<?php
    $name = $_POST['name'];
    $email = $_POST['email'];
    $tel = $_POST['tel'];
    $subject = $_POST['subject'];
    $message = $_POST['message'];
    $from = 'From: VERSATILE TRACKING ONLINE INQUIRY'; 
    $to = 'versatiletracking@gmail.com'; 
    $subject = $_POST['subject'];
    $human = $_POST['human'];
			
    // prepare email body text
	$Body .= "Full Name: ";
	$Body .= $name;
	$Body .= "\n";
        $Body .= "Email Address: ";
	$Body .= $email;
	$Body .= "\n";
 	$Body .= "Phone Number: ";
	$Body .= $tel;
	$Body .= "\n";
	$Body .= "\n";
	$Body .= "Subject: ";
  	$Body .= $subject;
        $Body .= "\n";
	$Body .= "Message: ";
	$Body .= "\n";
	$Body .= $message;
	$Body .= "\n";
	
    if ($_POST['submit'] && $human == '4') {				 
        if (mail ($to, $subject, $Body, $from)) { 
	    echo "<p>Your message has been received succesfully! <a href='http://www.lwegatech.com'>GO BACK</a> </p>";
	} else { 
	    echo '<p>Something went wrong, go back and try again!</p>'; 
	} 
    } else if ($_POST['submit'] && $human != '4') {
	echo '<p>You answered the anti-spam question incorrectly!</p>';
    }
	

?>