<?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];

if (isset($_REQUEST[brand])) {
    $mbrand = $_REQUEST[brand];

    $getitem = mysqli_query($conn,"SELECT * FROM `item` WHERE `brand`='$mbrand'") or die(mysqli_error($conn));

    Echo "<option></option>";
    while ($item = mysqli_fetch_array($getitem)) {
        Echo "<option value='$item[code]'>$item[name]</option>";
    }
}