<?php
include('db_connection.php');

$teacher_id = $_POST['teacher_id'];
$term = $_POST['term'];
$session = $_POST['session'];
$subject = $_POST['subject'];
$topics = $_POST['topics'];

$query = "INSERT INTO schemes_of_work (teacher_id, term, session, subject, topics) VALUES (?, ?, ?, ?, ?)";
$stmt = $conn->prepare($query);
$stmt->bind_param("issss", $teacher_id, $term, $session, $subject, $topics);

if ($stmt->execute()) {
    echo "Scheme of Work added successfully.";
} else {
    echo "Error: " . $stmt->error;
}

$stmt->close();
$conn->close();
?>
