<?php



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

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


if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$response=array();



 if(isset($course_id)){
 $sql="SELECT distinct course_id, season_id, exams_id,  paper, slot from submit_answer_script";
}

// if(isset($course_id)){
//  $sql="SELECT * from submit_answer_script";
// }



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

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

      $user=$row;


    }


echo json_encode($user);





?>