Figure 16-14 shows part of the source code generated for another message’s view page;
the hidden input fields used to pass selected mail state information are embedded near
the top.
The net effect is that hidden input fields in HTML, just like parameters at the end of
generated URLs, act like temporary storage areas and retain state between pages and
user interaction steps. Both are the Web’s simplest equivalent to programming
language variables. They come in handy anytime your application needs to remember
something between pages.
Hidden fields are especially useful if you cannot invoke the next script from a generated
URL hyperlink with parameters. For instance, the next action in our script is a form
submit button (Next), not a hyperlink, so hidden fields are used to pass state. As before,
without these hidden fields, users would need to reenter POP account details some-
where on the view page if they were needed by the next script (in our example, they are
required if the next action is Delete).
Figure 16-14. PyMailCGI view page, generated HTML
Reading POP Email| 1263