<?php
$host = 'localhost';
$db   = 'itsilhkd_notifications_db';
$user = 'itsilhkd_root';
$pass = '+#QU2BpDi.gw';
$charset = 'utf8mb4';

$dsn = "mysql:host=$host;dbname=$db;charset=$charset";

$options = [
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
];

try {
    $pdo = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
    // For debugging, you can log or show error
    // echo json_encode(['success' => false, 'error' => 'DB connection failed']);
    throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
