<?php



//include the headers resources

require_once('../includes/functions.php');







if($_REQUEST)

{

	$id 	= $_REQUEST['value1'];
	//$id2 	= $_REQUEST['value1'];

	$query = "SELECT id,type_id, title as programme_title

						  FROM programmes WHERE


						   type_id = '$id'
						  AND real_ = '0'
							AND mode = 1



						  ORDER BY programme_title";

	$results = mysqli_query($dbc,$query);?>

	<label  for="sub_programme_id">Programme</label>
    <div class="input-group">
      <select   name="programme"  id="sub_programme_id" class="form-control input-sm">

      <option value="">--Choose Programme --</option>

      <?php
  		if(mysqli_num_rows($results))
		{
           while ($rows = mysqli_fetch_assoc(@$results))

			{?>

          <option value="<?php echo $rows['pid'];?>"><?php echo $rows['programme_title'];?></option>

      <?php

			}

		}
		else
		{?>


          <option value="0">No programmes for such programme type</option>



          <?php

		}
		  ?>
      </select>
      <div class="input-group-addon"><span class="ast">*</span></div>

   </div>


<?php

}

?>
