<?php
// Include your database connection script
include('db_connection.php');

// Query to fetch the school name from the settings table
$sql = "SELECT school_name FROM settings LIMIT 1";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
    $school_name = htmlspecialchars($row['school_name']); // Use htmlspecialchars to prevent XSS
}

// Close database connection
$conn->close();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Footer</title>
    <link rel="stylesheet" href="styles.css"> <!-- Link your CSS file here -->
</head>
<body>
    <!-- Footer section -->
    <footer>
        <p>&copy; <?php echo date('Y'); ?> <?php echo $school_name; ?>. All right reserved</p>
    </footer>
</body>
</html>
