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

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

$mofano2 = $_REQUEST["mofano2"]; 
//$mofano2 = $_REQUEST["mofano2"]; 
$myvouch  = $_REQUEST["myvouch"]; 
//$passport  = $_REQUEST["passport"]; 

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

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

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

?>