[Solved] PHP MySQL query not returning a result [closed]


//Try This

<?php


// Some inputvalues (those are correct)
$user = "";
$pass = "";
$host = "";
$db = "";

$conn = mysqli_connect($host, $user, $pass, $db)
    or die("Het is niet gelukt om te verbinden met de database!");


// Vaststellen wat je wil weten
$grab = $_GET['grab'];

$query = "SELECT * FROM informaticaproject WHERE id=1";
$result = mysqli_query($conn, $query)
    or die("Geen gegevens opgehaald!");

echo $result;

while ($row = mysqli_fetch_assoc($result)) {
    $anwer = $row["'" . $grab . "'"];
}

echo $anwer;


mysqli_close($conn);

solved PHP MySQL query not returning a result [closed]