Last active
May 24, 2019 06:47
-
-
Save rey1024/3fbb94ac333d25c040146e8b22dabb27 to your computer and use it in GitHub Desktop.
API get 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
<?php | |
header("Content-type: application/json; charset=ISO-8859-1"); | |
include_once "koneksi.php"; | |
$kategori_id=$_GET['kategori_id']; | |
$sql = "select * from buku where kategori_id='$kategori_id'"; | |
$query = mysqli_query($koneksi, $sql); | |
$arrBuku = array(); | |
while ($row = mysqli_fetch_array($query)){ | |
$arrBuku[] = $row; | |
} | |
echo json_encode($arrBuku ); | |
mysqli_close($koneksi); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment