I have a following code, which is supposed to get a row with the identifier (name):
<?php
include "constants.php";
$namee=$_POST['name'];
$passw=$_POST['password'];
echo $namee."<br>";
echo $passw."<br>";
$databaseconnection=mysqli_connect("",dbuser,userpassword,"db");
$res=mysqli_query($databaseconnection,"SELECT Identifier,Password FROM accounts WHERE Identifier=$namee");
while($row=mysqli_fetch_array($res))
{
print_r($row);
}
?>
The error I get is "Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Xampp\htdocs\tests\loginlogic.php on line 15" which means there is no such record. I suppose "SELECT Identifier,Password FROM accounts WHERE Identifier=$namee" is wrong. In what way?