Products are stored in a file called catalog.dat. A line of the file has the following format:
{product-code}:{product-name}:{commerical-price}:{noncommercial-price}:{product-description}For example,
C05:Net Chat:50:20:New version; can handle any number of visitors!Product codes consist of three characters and are unique. You will first need to read and store this data in some reasonable data structures (perhaps separate hashes for product names, commercial prices, noncommercial prices, and descriptions, each using product code as keys, or separate arrays for each data field).
The <TITLE>
of the order page should be Order Form for New Customers
.
The page itself should consist of the following:
<H1>
heading that reads Order Form for New Customers
.
<HR>
).
<HR>
).
<H2>
heading that reads Please select the scripts you wish to purchase and the number of licenses:
. This is
followed by a series of product listings, each separated by a
<P>
. The listings do not have to be displayed in any
particular order.
-NAME
of the checkbox. The box should not be checked
at the beginning.
Item:
should appear in bold on the same
line as the checkbox. The label should be followed by the product name.
Commercial price:
should appear next in
bold on the same line. It should be followed by the commercial
price of the product (the price should include a dollar sign).
Noncommercial price:
should appear next in
bold on the same line, followed by the noncommercial
price of the product (the price should include a dollar sign).
Quantity:
should appear in bold on the same
line as the checkbox, followed by a textfield of
width 3 with an default value of 1. I would suggest that each
textfield be given a name that can be constructed from the
corresponding product code. Since product codes are of fixed
length, you can simply prepend a 'Q'
to the product code,
for example.
<BR>
), the product
description should appear in italics.
<HR>
).
<H2>
heading that reads Contact Information:
.
Intended use for script:
followed by a radio
group list consisting of two options -- Commercial and
Noncommercial. Both options should be on the same line. Neither
box should be checked at the beginning.
<HR>
).
<HR>
).
Submit Order
and a reset button titled
Reset Order
.