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


$size = $_REQUEST["size"];
$prodtype = $_REQUEST["prodtype"];
$brand = $_REQUEST["brand"];

$mprodname = mysqli_query($conn, "SELECT `prodname` FROM `item` where  prodtype = '$prodtype' AND brand = '$brand' and size='$size' group by prodname,quality order by prodname,quality") or die(mysqli_error($conn));

while ($tprodname = mysqli_fetch_array($mprodname)) {
    $prodname = $tprodname['prodname'];
    echo "<option value='$prodname'>";
}
