first commit

This commit is contained in:
2026-06-11 21:18:48 +07:00
parent 14ef9997c2
commit 2747d616c7
45 changed files with 7381 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
// php/update_bantuan_status.php
require_once 'koneksi.php';
header('Content-Type: text/plain');
$id = intval($_POST['id'] ?? 0);
$status = trim($_POST['status_penyaluran'] ?? '');
$valid = ['tersalur','belum','batal'];
if (!$id || !in_array($status, $valid)) {
http_response_code(400); echo 'Data tidak valid.'; exit;
}
$sql = "UPDATE histori_bantuan SET status_penyaluran='" . mysqli_real_escape_string($conn, $status) . "' WHERE id={$id}";
if (mysqli_query($conn, $sql)) { echo 'success'; }
else { http_response_code(500); echo 'Gagal: ' . mysqli_error($conn); }
?>