Server IP : 103.6.199.200 / Your IP : 18.219.231.197 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/cenxusco/supervisor.cenxus.com/wwwroot/ |
Upload File : |
<?php //require_once "conn.php"; error_reporting(E_ALL); if(!empty($_POST['name'])){ $dblink = @mysql_connect('localhost', 'chamber1_data', '1q2w3e4r5t6y'); if (!$dblink) { die('Could not connect: ' . mysql_error()); } $db = mysql_select_db('chamber1_data', $dblink); $strName= @mysql_escape_string($_POST["name"]); $strEmail = @mysql_escape_string($_POST["email"]); $strPhone = @mysql_escape_string($_POST["phone"]); $logtime = @date('Y-m-d H:i:s', time()); $logtime = date('Y-m-d H:i:s', time()); $recFromName = $strFirstName; $recFromEmail = $strEmail; $recToEmail = "hello@chambersresidence.com.my"; $recBody = "Name : ".$strName."<br>\r\n"; $recBody .= "Email : ".$strEmail."<br>\r\n"; $recBody .= "Phone : ".$strPhone."<br>\r\n"; $recSubject = "Chambers Residence KL"; $recHeaders = 'MIME-Version: 1.0' . "\r\n"; $recHeaders .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $recHeaders .= 'From: '.$recFromName.' <'.$recFromEmail.'>' . "\r\n"; $recHeaders .= 'X-Accept-Language: utf-8' . "\r\n"; mail($recToEmail,$recSubject,$recBody,$recHeaders); $strSQL = "INSERT INTO registrations (name, email, phone, regdate) VALUES "; $strSQL .= "('$strName', '$strEmail', '$strPhone', '$logtime')"; //echo $strSQL; //if ($_POST['die'] == 1){ // echo $strSQL; // die(); //} $res = mysql_query($strSQL, $dblink); //if(!$res){ // echo mysql_error($dblink); //} mysql_close($dblink); $FromName = "Chambers Kuala Lumpur"; $FromEmail = "hello@chambersresidence.com.my"; $body = "Dear $strName,<br><br>\r\n"; $body .= "Thank you for your registration details. We look forward to getting in touch with you soon.<br><br>\r\n"; $body .= "Best regards from Chambers Residence.<br><br>\r\n"; $subject = "Up to date with Chambers Residence."; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'From: '.$FromName.' <'.$FromEmail.'>' . "\r\n"; $headers .= 'X-Accept-Language: utf-8' . "\r\n"; mail($strEmail,$subject,$body,$headers); header("location: thankyou.html"); } else{ die("You did not fill in all the important details"); } ?>