<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

echo "Attempting to include db/config.php...<br>";
require_once 'db/config.php';
echo "db/config.php included successfully.<br>";

try {
    echo "Attempting to connect to the database...<br>";
    $pdo = db();
    echo "Database connection successful!<br>";
} catch (PDOException $e) {
    echo "Database connection failed: " . $e->getMessage() . "<br>";
}
