I've been having a problem with the prepared statements in MySQLI OOP. The problem is that I don't know how to use the num_rows() method correct. If I use var_dump to see the result of the variables I will get NULL because there is no data.
$stringMail = trim($_POST['mail']);
/*
.....
*/
$stmt = $mysqli->prepare("SELECT email FROM users WHERE email = ? ");
$stmt->bind_param('s', $stringMail);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($usersMail);
$iaMail = $stmt->num_rows;
$stmt->close();
Sorry for the bad English, I'm Dutch and my English isn't the very best... Thanks for helping!