<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Mark Attendance</title>
    <link rel="stylesheet" href="styles.css"> <!-- Link your CSS file here -->
</head>
<body>
    <div class="container">
        <h2>Mark Attendance</h2>
        <form action="process_mark_attendance.php" method="post">
            <label for="teacher">Teacher:</label>
            <select name="teacher" id="teacher" required>
                <option value="">Select Teacher</option>
                <?php
                // Include your database connection here
                include('db_connection.php');

                // Fetch teachers from the database
                $query = "SELECT * FROM teachers";
                $result = mysqli_query($conn, $query);

                if (mysqli_num_rows($result) > 0) {
                    while ($row = mysqli_fetch_assoc($result)) {
                        echo '<option value="' . $row['teacher_id'] . '">' . $row['name'] . '</option>';
                    }
                }

                mysqli_close($conn);
                ?>
            </select>

            <label for="date">Date:</label>
            <input type="date" id="date" name="date" required>

            <label for="status">Status:</label>
            <select name="status" id="status" required>
                <option value="">Select Status</option>
                <option value="Present">Present</option>
                <option value="Absent">Absent</option>
                <option value="Leave">Leave</option>
            </select>

            <button type="submit" class="button">Submit</button>
        </form>
    </div>
</body>
</html>
