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

error_reporting(0);

if(isset($_POST["companymid"]) && !empty($_POST["companymid"])){
    //Get all state data
    
	$companymid =$_POST["companymid"];
	
	$eve="SELECT * FROM res_bank_master WHERE companymid= ".$companymid;
	
    $re = mysqli_query($conn, $eve);
	//echo '<option value="'.$eve.'">'.$eve.'</option>';
    //Count total number of rows
    if(mysqli_num_rows($re) > 0)
	{
		echo '<option value="0">Select bank</option>';
        while($rt = mysqli_fetch_assoc($re)){ 
            echo '<option value="'.$rt['bankmid'].'">'.$rt['bankname'].'</option>';
			
        }
    }else{
        echo '<option value="0">No Data Found2</option>'; 
    }
}
?>