-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlihat.php
51 lines (48 loc) · 1.48 KB
/
lihat.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
<?php
include('koneksi.php');
?>
<html>
<head>
<title>Lihat Data - AccessNetLab</title>
</head>
<body>
<center><h1>Daftar Peminjaman</h1>
<table border="1" cellpadding="5" cellspacing="0">
<thead>
<tr>
<td><center><b>No</b></center></td>
<td><center><b>Username</b></center></td>
<td><center><b>Nama Barang</b></center></td>
<td><center><b>Tanggal Pinjam</b></center></td>
<td><center><b>Jumlah</b></center></td>
<td><center><b>Keperluan</b></center></td>
<td><center><b>Pilihan</b></center></td>
</tr>
</thead>
<tbody>
<?php
$query = mysql_query("SELECT * FROM datapinjaman");
$no = 1;
while ($data = mysql_fetch_array($query)) {
?>
<tr>
<td><center><?php echo $no; ?></center></td>
<td><center><?php echo $data['username']; ?></center></td>
<td><center><?php echo $data['namabarang']; ?></center></td>
<td><center><?php echo $data['tanggal']; ?></center></td>
<td><center><?php echo $data['jumlah']; ?></center></td>
<td><center><?php echo $data['keperluan']; ?></center></td>
<td>
<a href="edit.php?id=<?php echo $data['user_id']; ?>">Edit</a> ||
<a href="delete.php?id=<?php echo $data['user_id']; ?>">Hapus</a>
</td>
</tr>
<?php
$no++;
}
?>
</tbody>
</table>
</center>
</body>
</html>