I\'m new to using php mysqli prepared statements. No matter what I try I always get this error message.
Fatal error: Call to undefined function mysqli_stmt_init(
You don't need mysqli_stmt_init()
. Just issue your prepared statement directly.
if(mysqli_prepare($link, "SELECT * FROM users WHERE email=?")){
mysqli_stmt_bind_param($email_query, "s", $email);
mysqli_stmt_execute($email_query);
mysqli_stmt_store_result($email_query);
$exists_email = mysqli_stmt_num_rows($email_query);
mysqli_stmt_close($email_query);
}