While the windows-based application could deal with each little issue in the "action logic" that was assigned especially to deal with that particular issue, the web-based program has to figure out which are the parameters that are relevant while processing this particular invocation, and which special values should cause which special processing.
In this case, there are not many special variables.
Hint: it is generally a good idea to minimize the number of parameters that needs to be investigated while processing a web-request. General-purpose programs have their use, but when they end up spending most of their time figuring out what to do, this may defeat the purpose...
Local variable f is used to follow the value transmitted from the drop-down list. If no selection is made from that list (which means that f will have an empty value), no display activity is needed.
If a selection has been made, the "general" information is always presented, and the detailed information is only presented when the button with the label "Display All Information" was pressed.
Note: Information such as e-mail addresses and home pages
are presented as hyper-links. This means that it would be
possible to click on these hyper-links and access the home page
in question, or send e-mail to the person in question.
Since the values in the demonstration database are fictional,
these links will, of course, not work.
Before any information is presented, a HTML header is needed, since such headers need to occur at the start of any transmission, it makes sense to create a little subroutine that produces such a header, and also sets up a couple of parameters that make it easy to create a consistent "house style". In this case, the header subroutine causes the background to be white, and the font to be used to be "Arial". In addition, the corporate logo will be displayed, and a title will be presented both in the header-line of the browser-window, and at the start of the page.
At the end of the page, another instance of the input form will be generated, so that the end-user can select more information about the same person, or request information about a new person.
Note: the button with "Display All Information" is only
added to the form when a selection was made previously.
In order to cause any web-interaction, every form needs at least
one submit-button.
Go on to the next page in this sequence.