<?php
session_start();
$env = parse_ini_file('.env');

$adminEmail = $_POST['email'] ?? '';
$adminPass = $_POST['password'] ?? '';

if ($adminEmail === $env['ADMIN_EMAIL'] && $adminPass === $env['ADMIN_PASSWORD']) {
    $_SESSION['is_admin'] = true;
    echo "success";
} else {
    echo "invalid";
}