<?php
session_start();

// 1. Check if user is logged in
if (isset($_SESSION['user_id'])) {
    
    // If logged in, go straight to Player Dashboard
    header("Location: dashboard.php");
    exit();

} else {
    
    // Not logged in? Go to Login Page
    header("Location: ../login.php"); 
    exit();
    
}
?>