users); $emails = sanitizeString($data->umails); $pass = sanitizeString($data->passw); $cpass = sanitizeString($data->cpassw); $role = sanitizeString($data->roles); $loc = sanitizeString($data->location); $phones = sanitizeString($data->phone); $capcha = sanitizeString($data->cap); $code = sanitizeString($data->code); // $username = sanitizeString($username) ; $gender = 'NOT SET' ; //$data->level ; //$city = 'NOT SET' ; //$state = 'NOT SET' ; // $country = 'NOT SET' ; // $image = 'NOT SET' ; $status = 'INACTIVE' ; $pwd = md5($pass) ; //$uc = getnewid() ; //check if password match if($username =="" or $emails =="" or $pass == "" or $cpass == "" or $phones == "") { $msg = 'All fields must be filled' ; } if(empty($msg)) { if($pass !== $cpass) { $msg = 'Password Not Match, Retype it' ; } } //check capcha code if(empty($msg)) { if($capcha !== $code) { $msg = 'WRONG CAPCHA CODE ENTERED, TRY AGAIN' ; } } //check if the user has been registered before if(empty($msg)) { $chk = $DBcon->prepare("select * from members where emails = :um") ; $chk->bindparam(":um", $emails) ; $chk->execute() ; if($chk->rowcount() > 0) { $msg = "This Email has been Registered before" ; } else { $code = md5(uniqid(rand())); $sql = $DBcon->prepare("insert into members(fname,phone,emails,gender,roles,location,pwd,code,status) values(:na,:ph,:em,:ge,:ro,:lc,:pw,:tk,:stx)") ; //$sql->bindparam(":uk",$uc) ; $sql->bindparam(":na",$username) ; $sql->bindparam(":em",$emails) ; $sql->bindparam(":ph",$phones) ; $sql->bindparam(":ge",$gender) ; $sql->bindparam(":ro",$role) ; $sql->bindparam(":lc",$loc) ; //$sql->bindparam(":co",$country) ; $sql->bindparam(":pw",$pwd) ; //$sql->bindparam(":im",$image) ; $sql->bindparam(":tk",$code) ; $sql->bindparam(":stx",$status) ; if($sql->execute()) { //$last_id = $DBcon->lastInsertId(); //$id = base64_encode($last_id); $message = "
Hello $username,

WELCOME TO CRYSTAL BLOOM FAMILY!
Thanks for Registering in our System, below is your Login Details as supplied


Username or Login is your E-mail Address: $emails
Your Password is : As supplly
Thanks, and do not hestitate to contact Us via our Contact Page if you have any question or call us on (+447)481 440545 , Our live support is on, you can chat us and one of our team will respond to you.
Expecting to hear from you
CRYSTAL BLOOM MANAGEMENT
"; $subject = "WELCOME TO CRYSTAL BLOOM FAMILY"; $member->send_mail($emails,$message,$subject); $msg = "REGISTRATION SUCCESSFUL" ; } } } echo $msg ; ?>