<?php

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

$id=$request->getAttribute('id');
//$exam_end_date_time=$request->getParsedBody()['exam_end_date_time'];
	

  $sql = "UPDATE Exams SET  exam_end='1' WHERE id=$id";
if($con->query($sql)){
		$data=array(
    "id" => $id,
	);
	    $message=$data;
	
$response=array('status' => "true",'Message' => "End Exam");
echo json_encode($response);
        }
        else{
          $response=array('status' => "false",'Message' => "Exam started Failed");
         echo json_encode($response);
        } 

  ?>
