<?php
// Make sure no characters, spaces, or lines are before this tag.
// This is the single, authoritative place to start the session.
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}


// --- THIS LINE FIXES THE TIMEZONE ISSUE ---
// It sets the default timezone for all date/time functions in PHP.
date_default_timezone_set('Asia/Manila');

$servername = "localhost";
$username = "dxphubpr_dxpuser"; 
$password = "V~G8V9GSo1t?";    
$dbname = "dxphubpr_dxpdb";      

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



// Check connection
if ($conn->connect_error) {
  // Use a generic error message for the public to avoid revealing server details.
  die("Connection failed. Please try again later.");
}


// --- THIS LINE FIXES THE DATABASE CONNECTION ENCODING ---
$conn->set_charset("utf8mb4")

?>


