prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$user_id]); $user = $stmt->fetch(); if (!$user) { // User not found, destroy session and redirect to login session_destroy(); header("Location: login.php"); exit; } ?> Welcome, ! This is your profile page. Profile Information Username Email Role Balance $ Admin Panel
This is your profile page.