<?php

$host = "localhost";
$dbname = "majd1999_Menus";
$user = "majd1999_Menus";
$pass = "%#2rre6aK#C3Sg";

try {
    $pdo = new PDO(
        "mysql:host=$host;dbname=$dbname;charset=utf8mb4",
        $user,
        $pass,
        [
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
            PDO::ATTR_EMULATE_PREPARES => false
        ]
    );

    /* ===========================
       ضبط التوقيت على بغداد
    ============================ */
    date_default_timezone_set("Asia/Baghdad");
    $pdo->exec("SET time_zone = '+03:00'");
    $pdo->exec("SET @@session.time_zone = '+03:00'");

} catch (PDOException $e) {
    die("DATABASE ERROR: " . $e->getMessage());
}
