<?php
require("../../../config/koneksi.php");
require("../../../config/function.php");
require("../../../config/crud.php");
$guru=$_SESSION['id_pengawas'];
$mapel = $_POST['mapel'];

$sql = mysqli_query($koneksi, "SELECT * FROM tujuan WHERE kodemap='".$mapel."' AND idguru='".$guru."' ");
$html = "<option value=''>Pilih</option>";
while($data = mysqli_fetch_array($sql)){ 
	$html .= "<option value='".$data['tp']."'>".$data['tujuan']."</option>"; 
}
$callback = array('tp'=>$html); 
echo json_encode($callback); 
?>
