i'm trying to make a check to show content or not:
$stmt = $mysqli->prepare("SELECT *
FROM friends
WHERE friendID = ?
AND userID = ?");
$stmt->bind_param('ii', $id, $connectedUserID);
$stmt->execute();
if (login_check($mysqli) == true && $stmt->num_rows > 0) {
//do something
} else echo 'you are not allowed to be here';
I want to check if there's any row with those two ids.
But it's not working, i tried many different ways like using === or !== false.
Any help?
Ty!