<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

$passport = $_REQUEST["passport"];

$getbroker = mysqli_query($conn, "SELECT * FROM `medent` WHERE passport = '$passport' ") or die(mysqli_error($conn));
$rows = array();
$ctr = 0;
$mctr = 1;
$pctr2 = 1;
if (mysqli_num_rows($getbroker) > 0) {
    $r = mysqli_fetch_array($getbroker);
//     $passport = $r['passport']; 
    $issdate = $r['issdate'];
    $doe = $r['doe'];
    $religion = $r['religion'];
    $issplace = $r['issplace'];
    $paxname = $r['paxname'];
    $dob = $r['dob'];
    $address = $r['address'];
    $mobile = $r['mobile'];


    header("Content-type: application\json");
    echo json_encode($r);
}
?>