<?php
include '../../classes/session_class.php';
$session=new Session("../../manage/connection.php");

if(isset($_POST['class_number']) && isset($_POST['section'])  && isset($_POST['class_group']) && isset($_POST['teacher']))
{
    
    $class_number=htmlentities($_POST['class_number']);
    $section=htmlentities($_POST['section']);
    $class_group=htmlentities($_POST['class_group']);
    $teacher=htmlentities($_POST['teacher']);
    
    
    if($session->updateSession($class_groupion, $class_number, $teacher, $end, $session_id))
    {
        echo 'Session Updated';
    }
    else
    {
        echo 'Could not update session';
    }
}
else
{
     echo 'Field  not Set';
}
?>