-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbook_data.php
38 lines (38 loc) · 1.61 KB
/
book_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
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<title></title>
</head>
<body>
<h3>Tampil Buku</h3>
<table class="table table-hover table-striped">
<thead>
<tr>
<th>NO</th>
<th>KD BUKU</th>
<th>JUDUL BUKU</th>
<th>TAHUN BUKU</th>
<th>STOK BUKU</th>
<th>PENGARANG BUKU</th>
<th>PENERBIT BUKU</th>
<th>AKSI</th>
</tr>
</thead>
<tbody>
<?php
include_once('./connect.php');
$qry_buku=pg_query($conn,"select * from buku");
$no=0;
while($data_buku=pg_fetch_assoc($qry_buku)){
$no++;?>
<tr> <td><?=$data_buku['judul_buku']?></td> <td><?=$data_buku['tahun_buku']?></td><td><?=$data_buku['stok_buku']?></td> <td><?=$data_buku['pengarang_buku']?></td> <td><?=$data_buku['penerbit_buku']?></td> <td><a href="update_buku.php?kd_buku=<?=$data_buku['kd_buku']?>" class="btn btn-success">Ubah</a> | <a href="delete_buku.php?kd_buku=<?=$data_buku['kd_buku']?>" onclick="return confirm('Apakah anda yakin menghapus data ini?')" class="btn btn-danger">Hapus</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
</body>
</html>