"".$_POST['firstName']."","rp-2-Please enter your last name" => "".$_POST['lastName']."", "rp-1-Please enter your phone" => "".$_POST['phone']."", "rp-4-Please enter your email id" => "".$_POST['email']."", "rp--Please enter your comments" => "".$_POST['comments']."" ), $validation_ans_arr);
if($_POST['input_action']!=''){
if($_POST['security_code']==''){
$form_check_alert.="
Please Enter Word Verification Code.";
}
elseif ($_SESSION['verification_code'] != $_POST['security_code']) {
$form_check_alert.="Verification Word Mismatch ... Please try again with correct verification word.";
}
}
if($firstName=="First Name"){
$form_check_alert.="Please Enter Your First Name";
}
if($lastName=="Last Name"){
$form_check_alert.="Please Enter Your Last Name";
}
if($phone=="Phone"){
$form_check_alert.="Please Enter Your Phone";
}
if($email=="Email"){
$form_check_alert.="Please Enter Your Email ID";
}
if($comments=="Comments"){
$form_check_alert.="Please Enter Your comments";
}
if(!strlen($form_check_alert)>0){
$_SESSION['verification_code']="";
checkHTTPREFERER();
if(preg_match('#(?<=<)\w+(?=[^<]*?>)#', ms_htmlentities_decode($comments))) {
$save_qry="no";
}else{
$save_qry="yes";
}
if($save_qry != 'no') {
$ipTrack=$_SERVER['REMOTE_ADDR'];
mysql_query("insert into enquiry set firstName='$firstName',lastName='$lastName',email='$email',status='Y',recv_date=now(),ipTrack='$ipTrack',phone ='$phone',comments='$comments'");
$eID=mysql_insert_id();
############# Send Email ##########################
$mess=view_enquiry($eID);
$ContactPerson=$firstName." ".$lastName;
$admineMail=getAdminemail();
$subject="Enquiry ( Contact Us Page )";
sent_mail($ContactPerson,$email,$admineMail,$subject,$mess);
sent_mail($ContactPerson,$email,"raj_monga@centum.ca",$subject,$mess);
############################################
if($_POST['page']=="contact"){
$_SESSION['message']=" *** Your Request has been received. We will get back to you soon. ";
//header("Location: ".SITE_WS_PATH."/contact.htm");
echo '';
exit;
}else{
$msg=" *** Your Request has been received. We will get back to you soon. ";
echo "";
exit;
}
}else {
if($_POST['page']=="contact"){
$_SESSION['message']=" *** Your Request has been received. We will get back to you soon. ";
//header("Location: ".SITE_WS_PATH."/contact.htm");
echo '';
exit;
}else{
$msg=" *** Your Request has been received. We will get back to you soon. ";
echo "";
exit;
}
}
}
if($form_check_alert!=""){
$msg=html_head();
$msg.=$form_check_alert;
$msg.=html_foot();
}
}
echo mainHeader("Contact Us");
?>
show_message_front();?>=$msg;?>