<?php
include('connect.php');

error_reporting(0);

if(isset($_POST["inqbranch"]) && !empty($_POST["inqbranch"])){
    //Get all state data
    
	$eve="SELECT * FROM res_user_master WHERE utype = 'counseller' and branchmid=".$_POST["inqbranch"];
	
    $re = mysqli_query($conn, $eve);
	//echo '<option value="0">'.$eve.'</option>';
    //Count total number of rows
	echo '<option value="0">Select Counsellor</option>';
    if(mysqli_num_rows($re) > 0)
	{
		
        while($rt = mysqli_fetch_assoc($re)){ 
            echo '<option value="'.$rt['umid'].'">'.$rt['ufullname'].'</option>';
			
        }
    }else{
        echo '<option value="0">No Data Found1</option>'; 
    }
}else{
	echo '<option value="0">Select Counsellor</option>';
}
?>