<?php
// Enable error reporting for debugging
ini_set('display_errors', 1);
error_reporting(E_ALL);
include "db_config.php";

// Create a connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check the connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Optional: Set the charset to avoid character encoding issues
$conn->set_charset("utf8");

// Connection successful
// echo "Connected successfully"; // Uncomment for debugging purposes
?>
