There is 1 row in my database (that's equal with the WHERE statement) so the output needs to be 1, so it needs to say 'Account Bestaat'.
When I print the $account it prints 1 array thats in my database so my script has a good connection with the db. But when I want to count the rows it gives an error:
mysqli_num_rows() expects parameter 1 to be mysqli_result, null given.
I'm not so good with mysqli because I used mysql_query before.
How can I fix this so the $num_account should output "1"?
$connectie = mysqli_connect('localhost','*','*', '*') or die (mysqli_connect_error() . '<br><br>Kan geen verbinding krijgen met de almachtige timo server :D');
$account_raw = mysqli_query($connectie,"SELECT * FROM accounts WHERE gebruikersnaam='".$gebruikersnaam."' AND wachtwoord='".$wachtwoord."'");
$account = mysqli_fetch_assoc($account_raw);
$num_account = mysqli_num_rows($account);
if($num_account == 1){
echo 'Account Bestaat';
}
else {
echo 'Account Bestaat Niet';
}