query($sql); $sql_acc = "SELECT * FROM account where status='1' and email='".$em."' and validcode='".$vcode."'"; $rs_acc = $db->query($sql_acc); while ( $row_acc = $db->fetch_array($rs_acc) ){ $_SESSION["loginmail"]=$row_acc["email"]; echo ""; } } // Check Captcha if ($captcha_use && !empty($captcha_input) ) { if ($has_gd) { if (empty($captcha_input) || (trim($captcha_input) != $_SESSION['login_captcha']) ) { } else { if ( $_SERVER["REQUEST_METHOD"] == "POST" && $inputPassword2!="" && $pname!="" && $pemail!="" && $address!="" ) { // $inputPassword1 = test_input($_POST["inputPassword1"]); // $inputPassword2 = test_input($_POST["inputPassword2"]); // if ($inputPassword1!=$inputPassword2) $passwordcheck="*In-match password"; // else { $passwordcheck=""; $inputPassword1=""; $inputPassword2=""; } $validcode= date("Yid")."J".rand()."AS".rand().O.date("Hms")."n"; //20162510J909115442AS19969324O180813n $sql = "INSERT INTO account ( `user_id`, validcode, status, gender, `name`, `password`, `email`, `mobile`, `remark`, `address`, `last_login`,`loginip`, `createip`, `createtime` ) VALUES ( '' , '".$validcode."' , '0' , '".escapeit($_POST["gender"])."' , '".escapeit($_POST["pname"])."' , '".escapeit($_POST["inputPassword2"])."' , '".escapeit($_POST["pemail"])."' , '".escapeit($_POST["mobile"])."' , '".escapeit($_POST["aditionalInfo"])."' , '".escapeit($_POST["address"])."' , '00.00.00' , '' , '".$_SERVER['SERVER_ADDR']."' , NOW() )"; $db->query($sql); $body='

To activate your account and verify your email address, please click "this link"
Date'.date("Y-m-d h:i:s").'
Email'.$pemail.'
Phone'.$mobile.'
Name'.$pname.'
Address'.$address.'
Remark: '.nl2br($aditionalInfo).'





 

'; $email_head="Eshop Register Validation"; $email="jsbwong@hotmail.com"; //require("../class.phpmailer.php"); $mail = new PHPMailer(); $From = $mailsendname; $email = trim($email); $mail->AddReplyTo(trim($email), $email); // $mail->SetFrom($hostemail); $mail->FromName = trim($hostname); $mail->Sender = trim($email); $mail->Subject = $email_head; $mail->Body = $body; $mail->isHTML(true); clearstatcache(); $mail->AddAddress($email); $mail->AddBCC("jason@smartinfo.com.hk"); $result = $mail->Send(); echo ""; $inputPassword2=""; $pname=""; $pemail=""; $mobile=""; $address=""; $aditionalInfo=""; echo ""; } } } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>

Registration

">

Your personal information

验证码