<?php
require 'db.php';

header('Content-Type: application/json; charset=utf-8');

$sql = "SELECT id, nama_pemilik, status_kepemilikan, luas_m2, koordinat FROM tb_parsil ORDER BY id DESC";
$stmt = $pdo->query($sql);
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);

echo json_encode($results);
