-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathradiodb_database.php
More file actions
54 lines (53 loc) · 1.31 KB
/
radiodb_database.php
File metadata and controls
54 lines (53 loc) · 1.31 KB
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
<?php
include "koneksi.php";
mysql_select_db($_POST['db']);
$result = mysql_query($_POST['sql']);
$no = $_POST['no'];
if ($result){
$cek = mysql_num_rows($result);
if ($cek != 0){
echo "Field Value* : <select name='field_value_$no'>";
$i = 0;
while($i < mysql_num_fields($result))
{
$meta=mysql_fetch_field($result,$i);
echo "<option value='$meta->name'>$meta->name</option>";
$i++;
}
echo "</select><br>";
echo "Field Label* : <select name='field_label_$no'>";
$j = 0;
while($j < mysql_num_fields($result))
{
$meta=mysql_fetch_field($result,$j);
echo "<option value='$meta->name'>$meta->name</option>";
$j++;
}
echo "</select>";
}
else{
echo "Field Value* : <select name='field_value_$no'>";
$i = 0;
while($i < mysql_num_fields($result))
{
$meta=mysql_fetch_field($result,$i);
echo "<option value='$meta->name'>$meta->name</option>";
$i++;
}
echo "</select><br>";
echo "Field Label* : <select name='field_label_$no'>";
$j = 0;
while($j < mysql_num_fields($result))
{
$meta=mysql_fetch_field($result,$j);
echo "<option value='$meta->name'>$meta->name</option>";
$j++;
}
echo "</select><br>";
echo "Informasi : Data Kosong";
}
}
else{
echo "Perintah Tidak Benar";
}
?>