<?php
require_once '../config.php';

if (isset($_POST['tipe'])) {
	$post_tipe = $db->real_escape_string(e(@$_POST['tipe']));
	$cek_layanan = $db->query("SELECT DISTINCT operator FROM layanan_pulsa WHERE tipe = '$post_tipe' ORDER BY operator ASC");
	?>
	<option value="0">Pilih salah satu</option>
	<?php
	while ($data_layanan = $cek_layanan->fetch_assoc()) {
	?>
	<option value="<?= $data_layanan['operator'];?>" <?= $fetch_games['product'] == $data_layanan['operator'] ? 'selected' : '';?>><?= $data_layanan['operator'];?></option>
	<?php
	}
} else {
?>
<option value="0">Error.</option>
<?php
}