-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathi_alamat.php
executable file
·70 lines (43 loc) · 1.24 KB
/
i_alamat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
sleep(1);
require("inc/config.php");
require("inc/fungsi.php");
require("inc/koneksi.php");
$id_provinsi = $_POST['id_provinsi'];
$id_kabupaten = $_POST['id_kabupaten'];
$id_provinsi2 = $_POST['id_provinsi2'];
$id_kabupaten2 = $_POST['id_kabupaten2'];
if(isset($_POST["id_provinsi"]) && !empty($_POST["id_provinsi"]))
{
echo '<option value="" selected></option>';
$qku = mysqli_query($koneksi, "SELECT * FROM kabupaten ".
"WHERE id_prov = '$id_provinsi' ".
"ORDER BY nama ASC");
$rku = mysqli_fetch_assoc($qku);
do
{
$ku_idkab = nosql($rku['id_kab']);
$ku_nama = balikin($rku['nama']);
echo '<option value="'.$ku_idkab.'">'.$ku_nama.'</option>';
}
while ($rku = mysqli_fetch_assoc($qku));
exit();
}
if(isset($_POST["id_kabupaten"]) && !empty($_POST["id_kabupaten"]))
{
echo '<option value="" selected></option>';
$qku = mysqli_query($koneksi, "SELECT * FROM kecamatan ".
"WHERE id_kab = '$id_kabupaten' ".
"ORDER BY nama ASC");
$rku = mysqli_fetch_assoc($qku);
do
{
$ku_idkec = nosql($rku['id_kec']);
$ku_nama = balikin($rku['nama']);
echo '<option value="'.$ku_idkec.'">'.$ku_nama.'</option>';
}
while ($rku = mysqli_fetch_assoc($qku));
exit();
}
exit();
?>