<?php
session_start(); 
		$brmid=$_SESSION['linkarisebranchid'];
		$cmpmid=$_SESSION['linkarisecmpmid'];
	include("connect.php");


	
	if(isset($_POST["skills"]) && !empty($_POST["skills"])){
    //Get all city data
   
$par3 = $_POST['skills'];


$eve="select spotmid from res_party_master where partymid ='$par3'";
    $re = mysqli_query($conn, $eve);
//echo '<option value="'.$eve.'">'.$eve.'</option>';
    //Count total number of rows
    if(mysqli_num_rows($re) > 0)
{
        while($rt = mysqli_fetch_assoc($re)){
				$spotmid=$rt['spotmid'];	
			 $eve_category = "select * from res_spot_master where cmpmid=$cmpmid";
															$re_category = mysqli_query($conn, $eve_category);
																while($rt_category = mysqli_fetch_assoc($re_category))
																{
																		$spotname=$rt_category['spotname'];
																		$hallmid=$rt_category['spotmid'];
															
																	
																	if($hallmid==$spotmid){
																	echo "<option value='$hallmid' selected>$spotname</option>";
																	}
																	else{
																		echo "<option value='$hallmid'>$spotname</option>";
																	}
																}
       

        }
    }else{
        echo '<option value="0">No Data Found</option>';
    }
}
?>
