<?php
session_start();

// Simple static credentials (can later replace with DB users)
$valid_username = "Seelan";
$valid_password = "password123";

if ($_POST['username'] === $valid_username && $_POST['password'] === $valid_password) {
    $_SESSION['username'] = $_POST['username'];
    header("Location: dashboard.php");
    exit();
} else {
    echo "<script>alert('Invalid username or password!'); window.location.href='login.php';</script>";
}
?>