<?php require __DIR__ . '/../src/db.php'; ?>
<?php if($_POST){ 
    $h = password_hash($_POST['p'], PASSWORD_DEFAULT);
    $pdo->prepare("INSERT INTO users (username, password_hash, role) VALUES (?, ?, 'admin')")->execute([$_POST['u'], $h]);
    echo "Done. <a href='login.php'>Login</a>"; 
} ?>
<form method="post">User: <input name="u"><br>Pass: <input name="p" type="password"><br><button>Create Admin</button></form>