prepare("DELETE FROM analysisvocabulary WHERE idanalysisvocabulary = ?"); $stmt->bind_param('i', $id); if ($stmt->execute()) { echo json_encode(['success' => true]); } else { echo json_encode(['success' => false, 'error' => $stmt->error]); } } else { echo json_encode(['success' => false, 'error' => 'Invalid input']); }