CGI and Perl

Listing 13.3. The browse page.

<HTML><HEAD>
 <TITLE>Browse the Web Shopping Network by Category</TITLE>
 </HEAD>
 <BODY>
 <H1>
 Browse the Web Shopping Network by Category
 </H1>
 <P>
 <FORM ACTION="[process-search]" METHOD=POST>
 <STRONG>Category</STRONG><BR>
 <SELECT NAME="mv_searchspec">
    <OPTION VALUE="HomeAudio$"> Home Audio
    <OPTION VALUE="HomeVideo$"> Home Video
    <OPTION VALUE="CarAudio$"> Car Audio
    <OPTION VALUE="Computers$"> Computers
    <OPTION VALUE="Accessories$"> Accessories
 </SELECT>
 <INPUT TYPE=HIDDEN NAME="mv_case" VALUE="yes">
 <INPUT TYPE=HIDDEN NAME="mv_orsearch" VALUE="yes">
 <INPUT TYPE="hidden" NAME="mv_search_page" VALUE="results">
 <P>
 <INPUT TYPE="submit" NAME="mv_todo" VALUE="Search">
 <INPUT TYPE="hidden" NAME="mv_doit" VALUE="search"><BR>
 <P>
 [finish-order]
 Matches per page:
 <SELECT NAME="mv_matchlimit">
    <OPTION>5
    <OPTION>10
    <OPTION SELECTED>25
    <OPTION>50
 </SELECT><BR>
 </FORM>
 Just select one or more categories you wish to browse, then press the
 <B>Search</B> button.
 <P>
 </BODY> </HTML>

As you see, the only real difference with this page is the mv_searchspec field. Rather than provide an empty text field here, you assist the user by providing a list of categories from which to choose, as you can see in Figure 13.3. You might be curious about the [finish-order] MiniVend tag in these last two HTML files. I explain this tag in the next section on displaying the search results.

The Browse by Category page
Figure 13.3. The Browse by Category page.