<?php
$keyfilter = $_GET['keyfilter'];
$result=$proxy->GetRecordset($gettoken,'semester','','id_smt ASC','','');
//print_r($result);
$smt=$result['result'];
echo "<option>-- Pilih Tahun Semester --</option>";

for($i=0;$i<count($smt);$i++){
	  $nm_smt = $smt[$i]['nm_smt'];
	  $id_smt = $smt[$i]['id_smt'];
	  
		if (isset($_POST['tahun_msk']))
		   {
		   $selected = (isset($_POST['tahun_msk']) and $_POST['tahun_msk'] == $nm_smt) ? 'selected' : '';
		   echo "<option value='$id_smt' $selected>$nm_smt</option>\n";
		   
		   }
		else
		   {
		   $selected = (isset($_GET['tahun_msk']) and $_GET['tahun_msk'] == $nm_smt) ? 'selected' : '';
		   echo "<option value='$id_smt' $selected>$nm_smt</option>\n";
		   
		   }
}    

?>
