<?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['dept'])) {
    $dept = $_REQUEST['dept'];
    $getproc = mysqli_query($conn, "SELECT * FROM `process` WHERE `dept`='$dept'")or die(mysqli_error($conn));

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