-
Notifications
You must be signed in to change notification settings - Fork 4
/
i_ongkir_load_data.php
116 lines (74 loc) · 2.15 KB
/
i_ongkir_load_data.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?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 = mysql_query("SELECT * FROM kabupaten ".
"WHERE id_prov = '$id_provinsi' ".
"ORDER BY nama ASC");
$rku = mysql_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 = mysql_fetch_assoc($qku));
exit();
}
if(isset($_POST["id_kabupaten"]) && !empty($_POST["id_kabupaten"]))
{
echo '<option value="" selected></option>';
$qku = mysql_query("SELECT * FROM kecamatan ".
"WHERE id_kab = '$id_kabupaten' ".
"ORDER BY nama ASC");
$rku = mysql_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 = mysql_fetch_assoc($qku));
exit();
}
if(isset($_POST["id_provinsi2"]) && !empty($_POST["id_provinsi2"]))
{
echo '<option value="" selected></option>';
$qku = mysql_query("SELECT * FROM kabupaten ".
"WHERE id_prov = '$id_provinsi2' ".
"ORDER BY nama ASC");
$rku = mysql_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 = mysql_fetch_assoc($qku));
}
if(isset($_POST["id_kabupaten2"]) && !empty($_POST["id_kabupaten2"]))
{
echo '<option value="" selected></option>';
$qku = mysql_query("SELECT * FROM kecamatan ".
"WHERE id_kab = '$id_kabupaten2' ".
"ORDER BY nama ASC");
$rku = mysql_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 = mysql_fetch_assoc($qku));
exit();
}
exit();
?>