0) { // $row = mysqli_fetch_assoc($result); // $user_id = $row["id"]; // if (strlen($user_id) == 1){ // $user_id = "00".$user_id; // } // else if (strlen($user_id) == 2){ // $user_id = "0".$user_id; // } // else{ // $user_id; // } // echo "You are already subscribed"; // } // else{ // $query = "INSERT INTO waitlist (first_name, last_name, email) VALUES ('$first_name', '$last_name', '$email')"; // if (mysqli_query($conn, $query)) { // $query = "SELECT * FROM waitlist WHERE email='$email' LIMIT 1"; // $result = mysqli_query($conn, $query); // if ($result && (mysqli_num_rows($result) > 0)) { // $row = mysqli_fetch_assoc($result); // $user_id = $row["id"]; // if (strlen($user_id) == 1){ // $user_id = "00".$user_id; // } // else if (strlen($user_id) == 2){ // $user_id = "0".$user_id; // } // else{ // $user_id; // } // echo "You have successfully subscribed"; // } // } else { // echo "Error: " . mysqli_error($conn); // } // $name = $first_name.' '.$last_name; // $from = "info@healthbumpa.com"; // $to = $email; // $subject = "Welcome to the HealthBumpa Family 😍 !"; // $message = "Dear ".$name.", \n \nWelcome to the HealthBumpa family, where we're committed to making quality healthcare accessible and affordable to everyone. We're thrilled to have you join us on this journey to better health! By joining our waitlist, you've taken the first step towards securing your health and wellness.\n\nWe promise to keep you in the loop on everything HealthBumpa - from our exciting offers to valuable tips and resources to help you live and stay healthy. \n\nBut first, we want to take a moment to acknowledge and celebrate you for prioritizing your health. In a world where it\'s so easy to put our wellbeing at the backburner, you've shown that you're committed to taking care of yourself. We applaud you for that! \n \n a token of our appreciation, we\'ll be giving you exclusive access to our platform and offers before anyone else. So get ready to be among the first to experience the future of healthcare! \n\nWe can't wait to get to know you better and help you achieve your health goals. If you have any questions or just want to say hi, feel free to shoot us an email via info@healthbumpa.com \n\nTo Better Health, \n\nAugustine and the HealthBumpa Team."; // // The content-type header must be set when sending HTML email // $headers = "MIME-Version: 1.0" . "\r\n"; // $headers .= "Content-type:text/plain;charset=UTF-8" . "\r\n"; // $headers = "From:" . $from; // if(mail($to,$subject,$message, $headers)) { // //echo "Mail was sent successfully"; // }else { // echo "Mail was not sent."; // } // } // mysqli_close($conn); ?>