<?php 
include('../include/config.php');
if(!empty($_POST["id"])) 
{
  $cnt= $_POST["id"];
  $result =mysqli_query($con,"SELECT CBC1.*, pupils.Names as nam,pupils.AdmNo as adm from CBC1 left join pupils ON pupils.count=CBC1.PID where CBC1.mid='$cnt'");
    $row=mysqli_fetch_array($result);
    echo json_encode($row);  
    }else
    {
      echo "Not found";
    }

?>