<?php
$path_to_root = "../..";
include($path_to_root . "/includes/session.inc");
include($path_to_root . "/includes/ui.inc");
//include($path_to_root . "/includes/current_user.inc");
include_once($path_to_root . "/includes/db/connect_db.inc");

	$arr = array();
	
	$myrow2 = get_batches($_POST['selectedVal1']);
	//print_r($myrow2);
	
	$arr[0] = $myrow2[3];
	$arr[1] = $myrow2[10];
	$arr[2] = $myrow2[15];
	
	echo json_encode($arr);
	exit();

	function get_batches($id)
	{
	  $sql = "SELECT * FROM ".TB_PREF."batches b LEFT JOIN ".TB_PREF."courses c ON b.course_id = c.id WHERE b.id=".$id;
	  $result = db_query($sql, "could not get batches");
	  return db_fetch($result);
	}
	
	/*echo "course short name= ".$myrow2["course_short_name"];
	echo "course id= ".$myrow2["course_id"];
	echo "batch year= ".$myrow2["batch_year"];
	echo "batch month= ".$myrow2["batch_month"];
	echo "batch entrM= ".$myrow2["batch_entrM"];
	echo "tuition Fee= ".$myrow2["tuitionFee"];
	echo "uwe Fee= ".$myrow2["uweFee"];
	echo "tot fee= ".$myrow2["totalFee"];*/

?>
