As an example, let’s design a web page for an online record label. The record label, Apocabilly Records, ships every purchase with a shipping invoice that until now had been created as the merchandise was shipped. Our web page will process the order, and create a PostScript shipping invoice all at once.
The web page will take information submitted from an HTML form and
call a script called
will log the order in some sort of database and create the shipping
invoice. The web page that the customer would see is shown in Figure 11.4. It is assumed that prior to this point, some
sort of shopping cart script was used to catalog the user’s
selections as he navigated the site.
The HTML code for this web page would look something like the code
below. Notice the
FORM element with fields to
retrieve the customer’s name, address, city/state/zip, and the
hidden text fields containing the merchandise order and the total
amount of the purchase. These fields were created by our hypothetical
shopping cart script and will be passed on to the
processorder.cgi script upon submittal of the
form for inclusion in the final shipping invoice.
<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html"> <TITLE>Apocabilly Records Order Form</TITLE> </HEAD> <BODY> <TABLE CELLSPACING=0 BORDER=0> <TR><TD VALIGN="TOP"> <P> <IMG SRC="apocabilly2.gif" WIDTH=287 HEIGHT=96 ALT="Apocabilly Records, Since 1998></P> </TD> <TD VALIGN="TOP"> <H1>Order ...