<?php
    $rollno1 = $_REQUEST['id'];
    //$con = mysqli_connect("localhost","root","","hospital_management_software");
    include 'connection.php';
    if($rollno1!=="")
    {
        $query=mysqli_query($sql_con,"SELECT * FROM `personal` where AdmissionNo='$rollno1'");
        $row = mysqli_fetch_array($query);
        $sname = $row["Name"];
          $date = $row["Gender"];
          $time = $row["DateOfBirth"];
         $father = $row["Address"];
         $admission = $row["AdmissionDate"];
         $batch = $row["Batchtime"];
    }
    //$result = array("$sname", "$class", "$age", "$address", "$recomm_dr", "$date", "$time");
     $result = array("$sname", "$date", "$time", "$father", "$admission", "$batch" );
    $myJSON = json_encode($result);
    echo $myJSON;
?>