<?php
define('DB_SERVER', 'localhost');

define('DB_USERNAME', 'Restax_final');

define('DB_PASSWORD', 'Restax_final123');

define('DB_NAME', 'Restax_api_data'); 

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



$set_grade_id = $request->getAttribute('set_grade_id');


	$sql="DELETE FROM set_grade WHERE set_grade_id='$set_grade_id'";	

	

 if($con->query($sql)){

		$data=array(

"set_grade_id" => $set_grade_id,

	//"course_name"=>$course_name,

	);

	    $message=$data;

	

	$response=array('status' => "true",'Message' => "Data deleted successfully",'grade' => $message);

echo json_encode($response);

        

}

        else{

          $response=array('status' => "false",'Message' => " delete data failed");

         echo json_encode($response);

        }   




?>