<?php
// db.php - Clean version - UPDATED
 
if (!defined('SKIP_SESSION_START') && session_status() === PHP_SESSION_NONE) {
    session_start();
}

$host = "localhost";
$username = "uofsedu_Rmn";
$password = "Almnsi@27";
$database = "uofsedu_nahrain";


$mysqli1 = new mysqli($host, $username, $password, $database);

if ($mysqli1->connect_errno) {
    error_log("Database connection error: " . $mysqli1->connect_error);
    http_response_code(500);
    die("Database connection failed. Please try again later.");
}

$mysqli1->set_charset('utf8mb4');
?>