<?php
$con = mysqli_connect(localhost, Restax_final, Restax_final123, Restax_api_data);

$course_id=$request->getParsedBody()['course_id'];
$dept_id=$request->getParsedBody()['dept_id'];
$level_id=$request->getParsedBody()['level_id'];
$year=$request->getParsedBody()['year'];
$term=$request->getParsedBody()['term'];
$type=$request->getParsedBody()['type'];



$response=array();


$sql="SELECT shortcode FROM set_papers WHERE course_id='$course_id' AND dept_id='$dept_id' AND level_id='$level_id' AND year='$year' AND term='$term' AND type='$type'";


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

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

$user=$row;

}

echo json_encode($user);



?>