Files
2026-06-10 20:51:12 +07:00

17 lines
302 B
PHP

<?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);
?>