<?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];
$success = false;

$party = $_REQUEST['party'];

if (isset($_REQUEST["party"])) {

    $query = "SELECT `transporter` FROM `accmast` WHERE accode='$party'";

    $result = mysqli_query($conn, $query)or die(mysqli_error($conn));
    $r = mysqli_fetch_assoc($result);
    $query2 = "SELECT `name` FROM `transport` WHERE code='$r[transporter]'";

    $result2 = mysqli_query($conn, $query2)or die(mysqli_error($conn));
    $r2 = mysqli_fetch_assoc($result2);

    $ctr = 0;
    Echo "$r2[name]";
}