<?php
// super_admin/includes/db.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
        ]
    );
} catch (PDOException $e) {
    die("DB ERROR: " . $e->getMessage());
}

// shortcut
function db() { global $pdo; return $pdo; }
