<?php
include("../db.php");
header("Access-Control-Allow-Origin: * ");
date_default_timezone_set("Asia/kolkata");
		 
		 $id= $_REQUEST['idno'];		 
		 $session=$_REQUEST['session'];	
	
    $sql= $db->getRows("SELECT id,udate,Months,total,amount as paid,remaining,payment_mode,added_by,detail from receipt  WHERE idno='$id' and session='$session'") ;
    foreach($sql as $row)
	 { 
	     $data['tution'][]=$row;
	 }

	$sql1= $db->getRows("SELECT id,udate,Months,total,amount as paid,remaining,payment_mode,added_by,detail from hostel_receipt  WHERE idno='$id' and session='$session'") ;
    foreach($sql1 as $row1)
	 {
	     $data['hostel'][]=$row1;
	 }
	
    if(is_array($data) && count($data)>0)
	{
		echo json_encode(array('status' => 1, 'msg'=>'Record found Successfully..!', "data"=>$data));
	}   else
	{
	 	echo json_encode(array('status' => 0, 'msg'=>'No Record Found..!', "data"=>$data));
	}

?>