include "utils/MiddleWare.php"; $io_name = $req['io_name']; $io_serial_id = $req['id']; $status = $req['status']; if (isset($io_serial_id)) { $updateSql = "UPDATE `mast_io_serial_number` SET `io_name` = '$io_name', `status` = '$status' WHERE `id` = '$io_serial_id'"; $updateResult = $conn->query($updateSql); if ($updateResult) { sendResponse(true, "IO serial information updated successfully", null); } else { sendResponse(false, "Error while updating IO serial information: " . $conn->error, null); } } else { sendResponse(false, "Token not provided. Action not authorized.", null); }