The self_url method of a CGI object will return a URL to the current page that preserves the value of the form elements. You can invoke the delete method first to remove those parameters that you don't want reflected in this URL.
Comment on Re: Remembering values from an HTML form