<?php
// ============================================================
// Database connection (PDO)
// Update these credentials to match your cPanel MySQL setup.
// ============================================================
$DB_HOST = 'localhost';
$DB_NAME = 'bestwest_ivm';
$DB_USER = 'bestwest_ivm';   // <-- change to your actual DB username
$DB_PASS = 'bestwest_ivm';           // <-- change to your actual DB password

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) {
    die('Database connection failed: ' . $e->getMessage());
}
