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

$sql = mysqli_query($koneksi, "SELECT * FROM siswa_ptm WHERE fase='".$fase."' GROUP BY fase ");
$html = "<option value=''>Pilih</option>";
while($data = mysqli_fetch_array($sql)){ 
	$html .= "<option value='".$data['level']."'>".$data['level']."</option>"; 
}
$callback = array('tingkat'=>$html); 
echo json_encode($callback); 
?>
