<?php

$con = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);

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



$response=array();

if(isset($course)){
	$sql="select roll_number, student_name from student where course='$course'";
}
else{
	$sql="select roll_number, student_name from student";
}





$result=mysqli_query($con,$sql);

    while ($row[]=mysqli_fetch_assoc($result)) {  

      $user=$row;

	}


echo json_encode($user);

?>