										                                                                                                         

<?php



$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
     
		$course_id=$request->getParsedBody()['course_id'];
		$season_id=$request->getParsedBody()['season_id'];
		$exams_id=$request->getParsedBody()['exams_id'];
		$datetime=$request->getParsedBody()['datetime'];
		$staffnumber=$request->getParsedBody()['staffnumber'];
		$facultyname=$request->getParsedBody()['facultyname'];
		
			
$response=array();
/*
$sqll="(SELECT * FROM set_student_season WHERE  rollnumber='$rollnumber' OR student_name='$student_name')";
$res= $con->query($sqll);
if($res->num_rows>0)
{
$response1=array('status' => "true",'Message' => "data already exist");
echo json_encode($response1);
}

else{*/
$sql="INSERT INTO set_assign_proctors (course_id,season_id,exams_id,datetime,staffnumber,facultyname)
VALUES ('$course_id','$season_id','$exams_id','$datetime','$staffnumber','$facultyname')";

$res= $con->query($sql);
	
if($res==true)
{
		$data=array(
	
	"course_id"=>$course_id,
	"season_id"=>$season_id,
	"exams_id"=>$exams_id,
	"datetime"=>$datetime,
	"staffnumber"=>$staffnumber,
	"facultyname"=>$facultyname,
	
	
	);
	    $message=$data;

	$response=array('status' => "true",'Message' => "Data inserted successfully",'set_assign_proctors' => $message);
echo json_encode($response);
        
}
        else{
          $response=array('status' => "false",'Message' => " insert data failed");
         echo json_encode($response);
        }   
		
	



?>