Created
September 27, 2018 12:18
-
-
Save fannyhasbi/52eb9645f7fe7489dfd2ab653e895d64 to your computer and use it in GitHub Desktop.
Daftar buku-buku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Buku</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container-fluid"> | |
<div class="jumbotron alert-success text-center"> | |
<h1>Buku</h1> | |
</div> | |
<div class="row"> | |
<table class="table table-responsive table-hover table-striped"> | |
<thead> | |
<th>Judul</th> | |
<th>Penerbit</th> | |
</thead> | |
<tbody> | |
<?php | |
require_once "./koneksi.php"; | |
$sql = "SELECT * FROM buku"; | |
$query = mysqli_query($connect, $sql); | |
while($row = mysqli_fetch_assoc($query)){ | |
?> | |
<tr> | |
<td><?= $row['judul_buku']; ?></td> | |
<td><?= $row['penerbit']; ?></td> | |
<td> | |
<a href="detail.php?id=<?= $row['id_buku']; ?>" class="btn btn-link">Detail</a> | |
</td> | |
</tr> | |
<?php | |
} | |
?> | |
</tbody> | |
</table> | |
?> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment