Don't forget, HTTP is stateless--which means each time your CGI gets hit the browser is entering it "fresh"--except for whatever the browser passes in. The simplest way to maintain the info in between "sessions" is to embed the information you want to keep in your outputted HTML as an input field of type "HIDDEN". So it will be invisible to the casual user, but of course anybody who looks at the page source will see it. You can do a lot with this method if you do not have a big need for security. (If you're using a GET method with the form it will not only be visible in the HTML source, it will show up as part of the URL and in the web server log as well!)
Of course you can encrypt the text you place in the HIDDEN input field.
Another way to do this kind of thing is with cookies.
|