setActive($active); $needUpdate = true; } // Write back update if necessary if ($needUpdate) $q->update(); } } // All done. Go back to the edit page header("Location: ./");