<?php
include("../../db.php");
header('Content-Type: application/json');

$session = $_REQUEST['session'];
$class = $_REQUEST['class'];

//$result = $db->getRows("select DISTINCT type from examTimeTable where session='$session' and class='$class'");
$result = $db->getRows("select DISTINCT name from timetableexam where session='$session' ");

$data_arr = array();

if ($result) {
    foreach ($result as $rowc) {
        $data_arr[] = $rowc["name"];
    }
    echo json_encode(array("status" => 1, "data" => $data_arr, "msg" => "Record found"));
} else {
    echo json_encode(array('status' => 0, "data" => $data_arr,'msg' => 'detail not found..!'));
}