prepare("UPDATE daftar_ulang_spmb SET status_daftar_ulang = `Sudah`, waktu_daftar_ulang = NOW() WHERE no_pendaftaran = ?");
$stmt->bind_param("s", $no_pendaftaran);
if ($stmt->execute()) {
// Cek apakah ada data yang diupdate
if ($stmt->affected_rows > 0) {
echo "BERHASIL! No Pendaftaran $no_pendaftaran telah terupdate ke status SUDAH.";
} else {
echo "PERINGATAN: No Pendaftaran $no_pendaftaran tidak ditemukan atau sudah diupdate.";
}
} else {
echo "GAGAL: Terjadi kesalahan pada database.";
}
$stmt->close();
$conn->close();
?>