-
Notifications
You must be signed in to change notification settings - Fork 0
/
semua_data.php
38 lines (37 loc) · 918 Bytes
/
semua_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
<center>
<h1>Semua Data</h1>
</center>
<?php
$query = "select * from data_parkir"; //operasi MySQL utk mnmpilkn data
$result = mysql_query($query);
//membuat table
echo "<table border='1' align='center'>
<tr>
<th>ID</th>
<th>Plat</th>
<th>Tipe</th>
<th>Waktu Masuk</th>
<th>Waktu Keluar</th>
<th>Bayar</th>
<th>Gambar</th>
<th>Edit</th>
<th>Hapus</th>
</tr>";
//mengambil record dari database
while ($data=mysql_fetch_array($result))
{
echo"<tr>
<td>$data[id]</td>
<td>$data[plat]</td>
<td>$data[tipe]</td>
<td>$data[masuk]</td>
<td>$data[keluar]</td>
<td>$data[tarif]</td>
<td><img src=$data[gambar] width='100px' height='100px'/></td>
<td><a href=form_edit.php?id=$data[id]>Edit</a></td>
<td><a href=\"javascript:hapus(".$data['id'].")\">Hapus</a></td>
</tr>";
}
echo "</table>";
echo"<br/><input type='button' class='btn' value='Kembali' onClick='javascript:history.go(-1)'/>";
?>