 <?php
include("../../db.php");
header("Access-Control-Allow-Origin: * ");
header('Content-Type: application/json');
 
 
        $teacher_id=$_REQUEST['teacher_id'];
        $student_id=$_REQUEST['student_id'];
        $class=mysql_real_escape_string($teacher_id);
        $session=mysql_real_escape_string($student_id);
		$section=$_REQUEST['section'];




$result_term =mysql_query("select * from teacher_complain where teacher_id='$teacher_id' and student_id='$student_id'");


   while ($rowt = mysql_fetch_assoc($result_term)) 	
	{
	    
	
	
    	$jsond[]=array("id"=>$rowt['id'],"detail"=>$rowt['detail'],"send_by"=>$rowt['send_by'],"udate"=>$rowt['udate']);
 	    
	    
	}
	
           


         $json['status']=1;
		 $json['msg']="successful";
		  $json['data']=$jsond;   	



if(is_array($jsond) && count($jsond)>0)
	{  
		echo json_encode($json);    
			
	}else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'data not found..!'));
	}

       

	
	
	?>