<?php
session_start();
if (!isset($_SESSION['username'])) {
    header("Location: index.php");
    exit();
}
?>

<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <title>ยินดีต้อนรับ</title>
</head>
<body>
    <h2>ยินดีต้อนรับ, <?php echo $_SESSION['username']; ?>!</h2>
    <a href="logout.php">ออกจากระบบ</a>
</body>
</html>
