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

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$admin = $_SESSION["admin_" . $dbname];
$party = $_REQUEST['party'];
$custcode = $_REQUEST['custcode'];

$cond = "";
if (!empty($party)) {
    $cond = " AND `accode` = '$party'";
}
if (!empty($custcode)) {
    $ccond = " AND b.`custcode` = '$custcode'";
}

$getveh = mysqli_query($conn, "SELECT vehicleno FROM `custvehicle` where `accode` = '$party'") or die(mysqli_error($conn));

while ($fetveh = mysqli_fetch_array($getveh)) {
    $vehno = $fetveh['vehicleno'];
    echo "<option value='$vehno'>$vehno</option>";
}
?>