<?php
session_start();
$clave = "JuanD.1989";

if ($_POST) {
    if ($_POST['password'] === $clave) {
        $_SESSION['admin'] = true;
        header("Location: admin.php");
        exit;
    } else {
        $error = "❌ Clave incorrecta";
    }
}
?>
<form method="POST">
<h3>Admin recuerdos</h3>
<input type="password" name="password" placeholder="Clave">
<button>Entrar</button>
<?= $error ?? "" ?>
</form>
