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

	$par3 = $_GET['skills'];
    //$par3 = $_GET['skills'];


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


$eve="select function 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)){
				$function=$rt['function'];	
			  $eve_category = "select * from res_ocassion_master where cmpmid=$cmpmid";
															$re_category = mysqli_query($conn, $eve_category);
																while($rt_category = mysqli_fetch_assoc($re_category))
																{
																		$ocassionname=$rt_category['ocassionname'];
															
																	if($ocassionname==$function){
																
																	echo "<option value='$ocassionname' selected>$ocassionname</option>";
																	}
																	else{
																		echo "<option value='$ocassionname' >$ocassionname</option>";
																	}
																}
       

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