<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>System Status</title>
</head>
<body>

<h1>System Status</h1>
<p><strong>Hostname:</strong> <?php echo gethostname(); ?></p>
<p><strong>Database Connection Status:</strong> <?php echo check_database_connection() ? "Connected" : "Disconnected"; ?></p>

<script>
// Optional JavaScript for dynamic updates, if needed
</script>

</body>
</html>

<?php
// Function to check database connection status
function check_database_connection() {
    // Your database connection code here
    // For example, using PDO:
    try {
        $pdo = new PDO("mysql:host=localhost;dbname=mydatabase", "username", "password");
        return true;
    } catch (PDOException $e) {
        return false;
    }
}
?>


