<?php

if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
if (!isset($_SESSION['username'])) {
    header("Location: ./login.php");
    exit;
} else {
    if ($_SESSION['username'] == 'kasam') {
        // header("Location: ./dairy_dashboard.php");
        exit;
    } else {
        header("Location: ./user_dashboard.php");
        exit;
    }
}
?>