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

  $branchID=$_SESSION['branch'];
  $sql = "SELECT MAX(CAST(family_code AS UNSIGNED)) AS family_code FROM edu_student_details WHERE branch_id='$branchID'";

  //print_r($sql);
      $evt =$m->query($sql);

      $prev= $evt[0]['family_code'];
         
      $numb=$prev+1;      

  echo  $numb;

?>
