If statement always false?

Seems like I switched variables names half way through in my example and forgot to execute the query :blush:

It should be:


$statement = $mysqli->prepare('SELECT ip FROM `unbanned` WHERE ip=?');
$statement->bind_param("s", $ip);
$statement->execute();
$statement->bind_result($selectedIp);
$statement->fetch();
3 Likes