                                                                                                                                         
<?php


$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);



        $id = $request->getAttribute('id');
		$course_id = $request->getParsedBody()['course_id'];
$season_id=$request->getParsedBody()['season_id'];
$exams_id=$request->getParsedBody()['exams_id'];
$paper=$request->getParsedBody()['paper'];
$slots=$request->getParsedBody()['slots'];
	  
		
				
	$sql= ("UPDATE create_slots SET  course_id='$course_id', season_id='$season_id', exams_id='$exams_id', paper='$paper', slots='$slots' WHERE id=$id");	
	
 if($con->query($sql)){
		$data=array(
    "id" => $id,
	"course_id"=>$course_id,
	"season_id"=>$season_id,
	"exams_id"=>$exams_id,
	"paper"=>$paper,
	"slots"=>$slots,
	);
	    $message=$data;
	

	
	$response=array('status' => "true",'Message' => "Data updated successfully",'create_slots' => $message);
echo json_encode($response);
        
}
        else{
          $response=array('status' => "false",'Message' => " update data failed");
         echo json_encode($response);
        }   
		
?>