<?php
// DATABASE CONFIG
$db_host = "localhost";
$db_name = "xeznqcyz_swiftotp";
$db_user = "xeznqcyz_swiftotp";
$db_pass = "xeznqcyz_swiftotp";

try {
    $pdo = new PDO(
        "mysql:host=$db_host;dbname=$db_name;charset=utf8mb4",
        $db_user,
        $db_pass,
        [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_EMULATE_PREPARES => false
        ]
    );
} catch (PDOException $e) {
    // ❌ IMPORTANT: no HTML, no echo (AJAX safe)
    die("DB_CONNECTION_FAILED");
}
