<?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;
if (isset($_POST['dept'])) {
    $dept = $_POST['dept'];

    $get_dept = mysqli_query($conn, "SELECT * FROM `process` WHERE `dept`='$dept' ")or die(mysqli_error($conn));
    echo "<option>Select Process</option>";
    while ($tdept = mysqli_fetch_array($get_dept)) {
        echo "<option value=$tdept[code]>$tdept[name]</option>";
    }
}
?>