×PLease Fill this field..! "; exit(); }else{ if(!preg_match($emailValidation,$email)){ echo "
× this $email is not valid..!
"; exit(); } $sql = "SELECT email_id FROM email_info WHERE email = '$email' LIMIT 1" ; $check_query = mysqli_query($con,$sql); $count_email = mysqli_num_rows($check_query); if($count_email > 0){ echo "
× Email Address is already available
"; exit(); }else{ $db_sql = "SELECT * FROM email_info"; $db_query = mysqli_query($con, $db_sql); $count_db = mysqli_num_rows($db_query); $sql = "INSERT INTO `email_info` (`email_id`, `email`) VALUES ($count_db + 1, '$email')"; $run_query = mysqli_query($con,$sql); echo "
× Thanks for subscribing
"; } } } ?>