<?php
// File: includes/db_connect.php

$host = 'localhost';
$dbname = 'tunx6365_toyotatangerang.id';
$username = 'tunx6365_tunastoyotadealeruser'; 
$password = 'jh0c+S,cZS0x';

try {
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
} catch (PDOException $e) {
    die("Koneksi Database Gagal: " . $e->getMessage());
}

// NOTE: Tag penutup PHP sengaja dihapus untuk mencegah error "Headers already sent" akibat spasi kosong (whitespace)