<?php
session_start();
include('connect.php');
error_reporting(0);

if(isset($_POST["clgappmid"]) && !empty($_POST["clgappmid"])){
  
	$clgappmid=$_POST['clgappmid'];
	

	
	 $eve="SELECT * FROM res_collegeappliacation_master,res_collegeappmanagement_detail where res_collegeappliacation_master.collegeappliacationmid = res_collegeappmanagement_detail.collegeapplicationmid  and res_collegeappmanagement_detail.collegemid in (select collegemid from res_collegeapp_master where clgappmid = $clgappmid)  	 ";
	$re = mysqli_query($conn, $eve);
/* echo '<option value="0">'.$eve.'</option>';
    Count total number of rows */
    if(mysqli_num_rows($re) > 0)
	{
		echo '<option value="0">Select</option>';
		
		
        while($rt = mysqli_fetch_assoc($re))
		{
			/* $coursemid=$rt['coursemid'];
			$_SESSION['selectedcourse']=$coursemid; */
			$camdid=$rt['camdid'];
			$collegeappliacationname=$rt['collegeappliacationname'];
			
		  echo '<option value="'.$camdid.'" >'.$collegeappliacationname.'</option>';
			
        }
    }else{
        echo '<option value="0">Select </option>';
    }
}
?>
