//$name = $_POST['name'] ;
//$name = htmlspecialchars($_POST['name'], ENT_QUOTES);
//$mobile = $_POST['mobile'] ;
//$msg = $_POST['msg'] ;
//$verif_box = $_POST["verif_box"];
//$location = $_POST['location'] ;
$name = htmlspecialchars($_POST['name'], ENT_QUOTES);
$mobile = htmlspecialchars($_POST['mobile'], ENT_QUOTES);
$msg = htmlspecialchars($_POST['msg'], ENT_QUOTES);
$verif_box = htmlspecialchars($_POST['verif_box'], ENT_QUOTES);
$location = htmlspecialchars($_POST['location'], ENT_QUOTES);
$_POST['location1'] = htmlspecialchars($_POST['location1'], ENT_QUOTES);
if (!isset($_POST['submit'])||!isset($_POST['location'])||!isset($_POST['verif_box'])) { // if page is not submitted to itself echo the form
?>
Contact Motor Insurance Singapore
Motor Insurance Singapore
Singapore's #1 Car Insurance Specialist
Contact Us
} else {
if ( $_POST['location1'] && is_numeric($_POST['location1']) ) { $timetaken = time() - $_POST['location1']; } else { exit(); }
if( md5($verif_box).'a4xn' == $_COOKIE['tntcon'] && $timetaken > 40 ){
// if verification code was correct send the message and show this page
$message1 = 'Name: '.$name.'
Sent From: '.$location.'
User Took: '.$timetaken.'s
Message:
'.$msg;
mail( "support@motorinsurancesingapore.com", "Subject: New Message From Contact Page", $message1, "From: ".$mobile );
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
} else {
// if verification code was incorrect then return to contact page and show error
header("Location:/contact.html?wrong_code=true");
exit;
}
?>
Contact Motor Insurance Singapore
Motor Insurance Singapore
Singapore's #1 Car Insurance Specialist
Your Message Was Sent...
Thank you for contacting us. We'll get back to you ASAP.