<?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);



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


	$sql="DELETE FROM student WHERE student_id='$student_id'";	

	

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

		$data=array(

"student_id" => $student_id,

	//"course_name"=>$course_name,

	);

	    $message=$data;

	

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

echo json_encode($response);

        

}

        else{

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

         echo json_encode($response);

        }   




?>