<?php
$host = 'localhost';
$db   = 'monara_swarnawahini_db';
$user = 'monara';
$pass = 'UcKTQetxHi1[';
$charset = 'utf8mb4';

$dsn = "mysql:host=$host;dbname=$db;charset=$charset";

try {
    $conn = new PDO($dsn, $user, $pass);
    // Enable PDO exceptions for better error reporting
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    die("Database connection failed: " . $e->getMessage());
}
?>
