I'm trying to check if the content of the variable $host exists in the ID column of my database. Afterwards I want it to assign the corresponding value to $exists, if the entry is in the database or not.
For some reason this part of my script is always returning the same result, regardless if $host is contained in the database or not. Please help :)
$query = mysqli_query($conn, "SELECT 'ID' FROM 'servers' WHERE 'ID' = '$host'");
if (empty($query)) {
$exists = "false";
}
else {
$exists = "true";
}