'failed', 'message' => "Mandatory field is missing !({$param})" ]); header('Content-Type: application/json'); echo $response; exit(); } } $UpdateQuery = new WA_MySQLi_Query($cmctrfdb); $UpdateQuery->Action = "delete"; $UpdateQuery->Table = "identificationparts"; $UpdateQuery->addFilter("ididentificationparts", "=", "i", "{$_POST['id']}"); try { $UpdateQuery->execute(); $response = json_encode([ 'status' => 'success' ]); } catch (Exception $e) { $response = json_encode([ 'status' => 'failed', 'message' => $e->getMessage() ]); } } else { $response = json_encode([ 'status' => 'failed', 'message' => 'Method not allowed' ]); } header('Content-Type: application/json'); echo $response;