if (isset($_SESSION["auth"])) {
$id= $_SESSION["auth"]["id"];
$user = $db->query("SELECT * FROM users WHERE id=$id")->fetch();
$esya = $db->query("SELECT * FROM esyalar WHERE id=$id")->fetch();
}
yerine
if (isset($_SESSION["auth"])) {
$id= $_SESSION["auth"]["id"];
$user = $db->query("SELECT * FROM users WHERE id=$id")->fetch();
$esya = $db->query("SELECT * FROM esyalar")->fetch();
}
dene.