The goal is to check if a number is in the database. If it is it will give an echo that you have won. This is my current code but it does not seem to work.
Also only mysqli solutions please because mysql is deprecated.
$user_id = "dopnummer";
$mysqli = mysqli_connect('localhost', 'root', '', 'onsbier');
$checkUserID = mysqli_query("SELECT nummer FROM 'nummers' WHERE actief ='$user_id'");
if (mysqli_num_rows($checkUserId) > 0) {
echo "User id exists already.";
$user = mysqli_fetch_array($checkUserId);
print_r($user);