<?php
 
    /*include 'koneksi.php';*/
        $conn = new mysqli("localhost","root"," ","pt_gadai");

 
    $kode = $_GET['kode'];
 
?>
 
<select name="kantor" class="input">
 
    <option value="">-= Pilih Kota/Kabupaten =-</option>
 
    <?php
 
        $sql_kota = $conn->query("SELECT * FROM user WHERE kode='$kode' ORDER by kode ASC");
 
    while ( $r = $sql_kota->fetch_object() ){ ?>
 
        <option value="<?php echo $r->kantor ?>"> <?php echo $r->kode ?></option>
 
    <?php } /* end while */ ?>
 
</select>