<?php include("parent/callMe.php"); ?>



<?php
//echo "Hello";
if($_REQUEST['class_id']!='')
{ 


///$b=7;
$b=$_REQUEST['b'];

if ($_REQUEST['secID']!="") {
	
	$clsID=$_REQUEST['class_id'];
	$secID=$_REQUEST['secID'];
	$b=$_SESSION['branch'];
	$qr="select DISTINCT cell_no from edu_student_details where branch_id='$b' and status='0' and class_id='$clsID' and section_id='$secID'";
} else {

if($_REQUEST['class_id']=="All"){

	$qr="select DISTINCT cell_no from edu_student_details where branch_id='$b' and status='0' ";	
}
else {
	$qr="select DISTINCT cell_no from edu_student_details where branch_id='$b' and status='0' and class_id=".$_REQUEST['class_id'];
}

}
//echo $qr;
$secondLevel = $m->query($qr);

$numbers="";

foreach($secondLevel as $numb){
	
	$val=trim($numb['cell_no']);
	if($numb['cell_no']!=NULL && is_numeric($val)) {
	
		$numbers.=$val.",";
		
	}
	
	
}

	echo rtrim($numbers, ",");
	

 } ?>
