I want to get a username from a table, but something is wrong.
$hash = $_SESSION["hash"];
$con=mysqli_connect("127.0.0.1","root","","abc");
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con, "SELECT username FROM members
WHERE password=" . $hash);
$row = mysqli_fetch_array($result);
$end = $row['username'];
Error
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in D:\xampp\htdocs\xx_code\members_01\memberpage.php on line 24