����JFIF��`�`�����Viewing File: /home/u820193700/domains/spiti2026im.in/public_html/api/debug_login.php
<?php
require_once 'db_connect.php';

$password = 'Avahan2026';
$username = 'admin';

echo "Testing Password: $password\n";
echo "Testing Username: $username\n\n";

try {
    $stmt = $pdo->prepare("SELECT id, password_hash FROM admins WHERE username = ?");
    $stmt->execute([$username]);
    $admin = $stmt->fetch(PDO::FETCH_ASSOC);

    if ($admin) {
        echo "Admin found in DB.\n";
        echo "Hash in DB: " . $admin['password_hash'] . "\n";
        
        if (password_verify($password, $admin['password_hash'])) {
            echo "SUCCESS: Password verified!\n";
        } else {
            echo "FAILURE: Password does NOT match the hash in DB.\n";
            echo "Wait, let me generate a new hash for you: " . password_hash($password, PASSWORD_DEFAULT) . "\n";
        }
    } else {
        echo "FAILURE: Admin user not found in DB.\n";
    }
} catch (PDOException $e) {
    echo "DB ERROR: " . $e->getMessage() . "\n";
}
Back to Directory �������}�!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������������� ������w�!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������ ��?��_��+��?��(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�����