Created
September 27, 2018 12:19
-
-
Save fannyhasbi/9057769b984c8282584104866cad159a to your computer and use it in GitHub Desktop.
Halaman detail mengambil nilai id dari url dengan $_GET['id']
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
<?php | |
require_once "./koneksi.php"; | |
$sql = "SELECT * FROM buku WHERE id_buku = ". $_GET['id']; | |
$query = mysqli_query($connect, $sql); | |
$buku = mysqli_fetch_assoc($query); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Detail 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['judul_buku']; ?></h1> | |
</div> | |
<div class="row"> | |
<div class="col-md-4 col-md-offset-4"> | |
<table class="table table-hover"> | |
<tr> | |
<th>Harga</th> | |
<td><?= $buku['harga_buku']; ?></td> | |
</tr> | |
<tr> | |
<th>Penerbit</th> | |
<td><?= $buku['penerbit']; ?></td> | |
</tr> | |
<tr> | |
<th>Tanggal Terbit</th> | |
<td><?= $buku['tanggal_terbit']; ?></td> | |
</tr> | |
</table> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment