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

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

$maindb = 'accmast';
$zroot = $_SESSION["zdbroot"];

if (isset($_REQUEST["item"])) {
    $item = $_REQUEST["item"];

    $getitem = mysqli_query($conn, "SELECT unit FROM $maindb WHERE accode = '$item'") or die(mysqli_error($conn));
    $item = mysqli_fetch_array($getitem);
    if ($item['unit'] != '') {
        echo "$item[unit]";
    }
}
?>