<?php
include 'koneksi.php';

$query = mysqli_query($conn, "SELECT rfid FROM log_rfid ORDER BY id DESC LIMIT 1");
$row = mysqli_fetch_assoc($query);

echo json_encode(['rfid' => $row['rfid'] ?? '']);
