<?php
session_start();
include '../config/database.php';
$db = new Database(); $conn = $db->getConnection();

$id = $_GET['id'];
$stmt = $conn->prepare("SELECT * FROM visi_misi_dpw WHERE id =?");
$stmt->execute([$id]);

header('Content-Type: application/json');
echo json_encode(['data' => $stmt->fetch(PDO::FETCH_ASSOC)]);
?>