prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$_SESSION['user_id']]); $user = $stmt->fetch(); } catch (PDOException $e) { // Log error or handle it gracefully } } $current_page = basename($_SERVER['PHP_SELF']); ?>