<?php

ini_set('display_errors', 1);

error_reporting(E_ALL);



$host = "attendance.brookeholding.com";

$user = "brookeho_hrms";

$pass = "@Brooke1912";

$dbname = "brookeho_hrms";



$conn = new mysqli($host, $user, $pass, $dbname);



if ($conn->connect_error) {

    http_response_code(500);

    echo json_encode([

        "success" => false,

        "error" => "DB connection failed: " . $conn->connect_error

    ]);

    exit();

}



$conn->set_charset("utf8mb4");

?>