<?php include('parent/callMe.php');?>
<?php include('Sessioncheck.php');?>
<div id="getLikeStudents" style="">
<?php
$dumy=session_id().session_id().session_id().session_id().session_id();
   

 $branch=$_SESSION['branch'];
 $q = preg_replace( '/\s+/', '', $_REQUEST['like_name'] );
 $query="SELECT student_id,ref_no,first_name,last_name,cell_no,branch_id,class_id,candidate_roll_no,section_id,session_id,family_code,status FROM `edu_student_details` where branch_id='$branch' and status='0' AND first_name like '$q%'  limit 0,15";
 $students = $m->query($query);
 $data="";
 foreach($students as $student){

	if (strlen($q)>0) {	
	$m->where("class_id", $student['class_id']);
    $class_data=$m->get("edu_class_config");
	$id=$student['student_id'];
	$name=$student['first_name'];

		$data=$data . "
		<br>
<div style='padding-left:0.5%;border-bottom:1px solid lightgray;'>
	<a href='check_pay_fee.php?$dumy&student=$id&qr=$name&$dumy#std_section'>
	 <span> " .$student['first_name']." | " .$student['last_name']."  </span> |".$class_data[0]['Class_Name']." | 
	 <span style=''> " .$student['candidate_roll_no']." | " .$student['ref_no']." </span>
	</a>
</div>
		";


	}
	     
		// Set output to "no suggestion" if no hint was found
		// or to the correct values
		

 }

 if ($data=="") {
	  $data="No Suggestion...";
	} else {
	  $data=$data;
}

 echo $data;

?>

</div>