<?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"]; 
$myvouch  = $_REQUEST["myvouch"]; 

$getbroker = mysqli_query($conn, "SELECT `passport`,`vouchno`,`vouchdt` FROM `visatran` WHERE passport =  '$passport' and myvouch != '$myvouch'  ") or die(mysqli_error($conn));

$r = mysqli_fetch_array($getbroker); 
//     $passport = $r['passport']; 
     $voucher = $r['vouchno'];
     $vouchdt = $r['vouchdt'];

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

?>