<?php
//Include database configuration file
include('../Server/connection.php');

if(!empty($_POST["deptId"])){
	
	
    //Get all state data
    $query3 = $conn->query("SELECT * FROM designation WHERE dept_id = ".$_POST['deptId']." ORDER BY des_name");
    
    //Count total number of rows
    $rowCount3 = $query3->num_rows;
    
    //Display states list
    if($rowCount3 > 0){
        //echo '<option value="">Chagua Kata</option>';
        while($row3 = $query3->fetch_assoc()){ 
            echo '<option value="'.$row3['des_id'].'">'.$row3['des_name'].'</option>';
        }
    }else{
        echo '<option value="">No Designation </option>';
    }
	

			
}


?>