needs); $emails = sanitizeString($data->umails); $names = sanitizeString($data->names); $phones = sanitizeString($data->phone); $capcha = sanitizeString($data->cap); $code = sanitizeString($data->code); //$uc = getnewid() ; //check if password match if($needs =="-Select Who needs Care-" or $emails =="" or $phones == "") { $msg = 'All fields must be filled' ; } //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)) { $sql = $DBcon->prepare("insert into carerequest(wneed,names,phone,emails) values(:a,:b,:c,:d)") ; //$sql->bindparam(":uk",$uc) ; $sql->bindparam(":a",$needs) ; $sql->bindparam(":b",$names) ; $sql->bindparam(":c",$phones) ; $sql->bindparam(":d",$emails) ; if($sql->execute()) { $message = "
Hello $names,

WELCOME TO CRYSTAL BLOOM FAMILY!
Thanks for trusting Crystal Bloom ltd in applying for Our Care Support, We have got your Application and one of our Team will get back to you as soon as possible Thanks, and do not hestitate to contact Us 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"; // To send HTML mail, the Content-type header must be set $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=UTF-8\r\n"; $headers .= "From: noreply@yourwebsite.com\r\n"; $headers .= "Reply-To: support@yourwebsite.com\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); if (mail($emails, $subject, $message, $headers)) { // header("location: success.php") ; $msg = "REQUEST SUCCESSFUL" ; }else{ $msg = "SOMETHING WENT WRONG, TRY AGAIN" ; } } } echo $msg ; ?>