<?php
/* Attempt to connect to MySQL database */
$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);

 
    //Verifying the required parameters
    // verifyRequiredParams(array('firstname', 'email', 'password'));
$id=$request->getAttribute('schedule_id');
 
 $response=array();
 $data=array();

  $query = "DELETE FROM schedule_exam WHERE id=?";
 $stmt = $con->prepare($query);
 $stmt->bind_param("s",$id);
  //$stmt->execute();
 $result = $stmt->execute();
        $stmt->close();
        if($result==true){

$response=array('status' => "false",'Message' => "Exam Schedule Removed Succesfully");
echo json_encode($response);
        }
        else{
          $response=array('status' => "true",'Message' => "Exam Schedule Removed Failed");
         echo json_encode($response);
        } 

        ?>