Hello, I have a problem, I would like to know about prepared statements, I have this code:
$query_email = ("SELECT email FROM usuarios_ WHERE email = ?");
$stmt = mysqli_stmt_init($conn);
if (mysqli_stmt_prepare($stmt, $query_email)) {
mysqli_stmt_bind_param($stmt, 's', $email);
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt, $resultado);
mysqli_stmt_fetch($stmt);
echo $resultado;
mysqli_stmt_close($stmt);
}
So far so good, my question is, how to know if it has worked or not, because as it is a login system I have to pass the feedback back to the user whether the email exists or not.