Check to see if an email is already in the database using prepared statements
Should be something like this: // enable error reporting for mysqli mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); // create mysqli object $mysqli = new mysqli(/* fill in your connection info here */); $email = $_POST[’email’]; // might want to validate and sanitize this first before passing to database… // set query $query = “SELECT COUNT(*) FROM users WHERE … Read more