Next Up Prev


Step 08: Create Order Page

Now it's time to create the order page. But first a quick diversion. For reasons, I won't go into (it's a hack to do with lists), if you say:

<DL>
<DT>
<DL>
MATERIAL
</DL>
</DL>
then the MATERIAL will be indented. This mechanism is used on many of the pages in the Tarmac Travel web.

The Tarmac Travel order page essentially consists of just a form. Here's the HTML for the form.

<FORM METHOD="POST" ACTION="http://www.tarmactravel.com.au/cgi/mail">
<INPUT TYPE="hidden" NAME="mailto" VALUE="order@tarmactravel.com.au">
<TABLE>
<TR><TD><STRONG>Name:</STRONG></TD>
<TD> <INPUT TYPE="text" SIZE="30" NAME="Name"></TD></TR>
<TR><TD><STRONG>Email:</STRONG></TD>
<TD> <INPUT TYPE="text" SIZE="30" NAME="Email"></TD></TR>
<TR><TD><STRONG>Destination:</STRONG></TD>
<TD>
    <SELECT NAME="Destination">
    <OPTION SELECTED>
    <OPTION>Antarctica
    <OPTION>Australia
    <OPTION>Africa
    <OPTION>China
    <OPTION>England
    <OPTION>Greece
    </SELECT>
    </TD></TR>
</TABLE>
<BR>
<INPUT TYPE="submit" VALUE="Order Holiday">
</FORM>

Forms are complicated and we could easily get lost in detail here. If you want to learn more about forms, refer to the WebHints page on forms. For now, here are some points about the order form:

METHOD: The METHOD tag tells the form what it should do with the information contained in the form when the user submits the form. In this case, the action is to run a CGI script to email the information to order@tarmactravel.com.au. Configuring a form to send the form to an email address is usually easy, but you need to talk to your Internet Service Provider to find out exactly how it's done.

TABLE: I have used a table to line up the field labels with the fields themselves. The FORM tag isn't very fussy about the stuff you place between FORM and /FORM. All it cares about is the form fields such as INPUT and SELECT.

That's all for this step. Try visiting one of the country pages and then try jumping to the order form page. Try pulling down the pull down menu, but don't actually submit the order form, as it's been nobbled! Remember, Tarmac Travel doesn't actually exist!

SourceSurfChanges Made In This Step
africa.html africa.html
antarctica.html antarctica.html
australia.html australia.html
china.html china.html
england.html england.html
greece.html greece.html
home.html home.html
index.html index.html
order.html order.html Created this order page.

Click here to go to Step 09


www.ross.net WebHints WebHints Tutorial
webmaster@ross.net
Copyright © Ross N. Williams 1997. All rights reserved.