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

$zdb = $_SESSION["zdbyear_" . $dbname];
$zyear = right($zdb, 4);

mysqli_select_db($conn, $zdb);

$mattype = $_REQUEST[mattype];

if (isset($mattype) != "") {
    ?>
        <option value=''></option>
        <?php
        $getrawmater = mysqli_query($conn, "SELECT `code`, `name` FROM `rawmater` where `mattype`='$mattype' ORDER BY `name`") or die(mysqli_error($conn));
        while ($wrawm = mysqli_fetch_array($getrawmater)) {
            echo "<option value='$wrawm[code]' >$wrawm[name]</option>";
        }
        ?>
    <?
}
?>