<?php
require_once 'db.php';

$username = 'keyte';
$password = 'Anna4082Daimon!'; // <- use the actual password you typed during install

$stmt = $pdo->prepare("SELECT * FROM admins WHERE username = ?");
$stmt->execute([$username]);
$admin = $stmt->fetch();

file_put_contents('debug-login-2.txt', "Username: $username\nPassword: $password\n", FILE_APPEND);
file_put_contents('debug-login-2.txt', "DB result: " . print_r($admin, true) . "\n", FILE_APPEND);

if ($admin && password_verify($password, $admin['password'])) {
    file_put_contents('debug-login-2.txt', "✅ MATCHED\n", FILE_APPEND);
} else {
    file_put_contents('debug-login-2.txt', "❌ NOT MATCHED\n", FILE_APPEND);
}
