$stmt = $pdo->prepare('SELECT * FROM users WHERE id = ?'); $stmt ->execute([$_COOKIE['id']]); $user = $stmt->fetch(PDO::FETCH_ASSOC);