<?php
// config/config.php
date_default_timezone_set('Asia/Hong_Kong');

$db = new mysqli('localhost', 'root', 'Hazel1357!', 'WinRacingSystem');

if ($db->connect_error) {
    die("<div class='alert alert-danger'>連線失敗: " . $db->connect_error . "</div>");
}

// 設定編碼避免亂碼
$db->set_charset("utf8mb4");
?>