<?php
$host = '127.0.0.1'; // or your DB host
$db = 'worker_management_app';
$user = 'root'; // your database user
$pass = ''; // your database password

try {
    $conn = new mysqli($host, $user, $pass, $db);

    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
} catch (mysqli_sql_exception $e) {
    die("Connection failed: " . $e->getMessage());
}
?>
