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

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

	
	 $eve="SELECT * FROM res_courseintaketerm_detail where  coursemid = $coursemid 	 ";
	$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; */
			$ctermmonth=$rt['ctermmonth'];
			
		  echo '<option value="'.$ctermmonth.'" >'.$ctermmonth.'</option>';
			
        }
    }else{
        echo '<option value="0">Select </option>';
    }
}
?>
