<?php
// db/db_connection.php

// Database configuration
define('DB_HOST', 'localhost');
define('DB_NAME', 'orozdesign_LocalCRMToolKit');
define('DB_USER', 'orozdesign_ClientsCRMToolKit');
define('DB_PASS', 'a_0gHC(DXmdZTG&?W7');

// Attempt to establish a connection
try {
    $pdo = new PDO("mysql:host=" . DB_HOST . ";dbname=" . DB_NAME . ";charset=utf8", DB_USER, DB_PASS);
    // Set the PDO error mode to exception
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    // Lanzamos la excepci¨Žn para que sea manejada por el script que incluye.
    throw $e;
}