format("Y-m-d"); $surveyTime =date('H:i:s'); $myUID = $user_data['u_id']; if(isset($_POST['done'])){ $custName = mysql_escape_string($_POST['custName']); $custMobile = mysql_escape_string($_POST['custMobile']); $custEmail = mysql_escape_string($_POST['custEmail']); $saDate = mysql_escape_string($_POST['saDate']); $saName = mysql_escape_string($_POST['saName']); $custPlate = mysql_escape_string($_POST['custPlate']); $Qa = mysql_escape_string($_POST['Qa']); $Qb = mysql_escape_string($_POST['Qb']); $Qc = mysql_escape_string($_POST['Qc']); $Qd = mysql_escape_string($_POST['Qd']); $Qe = mysql_escape_string($_POST['Qe']); $Qf = mysql_escape_string($_POST['Qf']); $Qg = mysql_escape_string($_POST['Qg']); $Qh = mysql_escape_string($_POST['Qh']); $Qi = mysql_escape_string($_POST['Qi']); $commentBox = mysql_escape_string($_POST['commentBox']); $dealer=$_GET['d']; $checkIfExist = mysql_result(mysql_query("SELECT COUNT(id) FROM `fgp_survey_db` WHERE `cs_plate`='$custPlate' AND `date`='$surveyDate'"),0); $scoreT = $Qa + $Qb + $Qc + $Qd + $Qe + $Qf + $Qg + $Qh + $Qi; $score = number_format(((($scoreT / 9) /10) * 100),2,'.',','); if($checkIfExist > 0){ echo "THANK YOU!

You already completed the customer feedback form.

Please feel free to contact us anytime if you have more questsions or inquiry.



Call us: 8860-8888
E-mail: info@autohubgroup.com"; }else{ mysql_query("INSERT INTO fgp_survey_db(date,time,custName,custMobile,custEmail,saDate,saName,Qa,Qb,Qc,Qd,Qe,Qf,Qg,Qh,Qi,commentBox,cs_plate,dealer,score) VALUES('{$surveyDate}','{$surveyTime}','{$custName}','{$custMobile}','{$custEmail}','{$saDate}','{$saName}','{$Qa}','{$Qb}','{$Qc}','{$Qd}','{$Qe}','{$Qf}','{$Qg}','{$Qh}','{$Qi}','{$commentBox}','{$custPlate}','{$dealer}','{$score}')"); echo "THANK YOU!

You have completed the customer the feedback form.

Your input will help us improve our service in the future and make your next visit a more enjoyable one. If you have any concerns or inquiries, please feel free to contact us anytime.



Call us: 8860-8888
E-mail: info@autohubgroup.com"; } } ?>