This doesn’t appear to work. I also tried num_rows<0. It’s supposed to see if the entered string ($username) is NOT in the DB, and display the error. I’m not sure if the syntax is correct. Help please!
if ($stmt = $db->prepare('SELECT * FROM xf_user WHERE username = ?')) {
$stmt->bind_param('s', $username);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows<1) {
$user_error = "<br><span class='error_msg'>Member not found!</span>";
}
}