<?php
/**
 * Database Configuration for Finggu Infotech
 * City-Service Dynamic Pages System
 */

// Load database configuration
$config = require __DIR__ . '/../config/database.php';

// Create connection
$conn = new mysqli(
    $config['host'],
    $config['username'],
    $config['password'],
    $config['dbname']
);

// Check connection
if ($conn->connect_error) {
    error_log("Database Connection failed: " . $conn->connect_error);
    die("We're experiencing technical difficulties. Please try again later.");
}

// Set charset to utf8mb4
$conn->set_charset("utf8");
?>