<?php 
include('../include/config.php');
if(!empty($_POST["id"])) 
{
    $cnt= $_POST["id"];
  
    $result =mysqli_query($con,"SELECT * FROM  pupils WHERE count='$cnt'");
    $row=mysqli_fetch_array($result);
    echo json_encode($row);
    }else
    {
      echo "Not found";
    }

?>