first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
include 'koneksi.php';
|
||||
|
||||
// Query ambil semua data
|
||||
$query = "SELECT * FROM spbu";
|
||||
$result = mysqli_query($conn, $query);
|
||||
|
||||
$data = [];
|
||||
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
$data[] = $row;
|
||||
}
|
||||
|
||||
// Kirim dalam format JSON
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($data);
|
||||
?>
|
||||
Reference in New Issue
Block a user