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

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

$manualno = $_REQUEST["manualno"]; 
$myvouch  = $_REQUEST["myvouch"]; 

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

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

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

?>