<?php 
    include_once "../../config/conn.php"; 
    $kab =isset($_GET['kab'])?$_GET['kab']:""; 
    if($kab!="") 
    { 
        $sql="SELECT * FROM sub_kategori_kas WHERE id_jenis_transaksi='$kab'"; 
        $hasil=mysqli_query($conn, $sql);
?>
  <select name="kecamatan" id="kecamatan" >
        <option value="0">---Pilih Kecamatan---</option>
            <?php 
                while($row=mysqli_fetch_array($hasil)) 
                    { 
            ?>
        <option value="<?php echo $row['id'];?>"><?php echo $row['nama_subkategori'];?></option>
            <?php 
                    } 
            ?>
  </select>
<?php 
    } 
?>
