HTML and CSS Reference
In-Depth Information
Getting ready to build the Bean Machine form
Before we start building that form, take a look inside the “chapter14/starbuzz”
folder, and you'll find the file “form.html”. Open it and have a look around. All
this file has in it are the HTML basics:
<!DOCTYPE html>
<meta charset="utf-8">
<title> The Starbuzz Bean Machine </title>
<h1> The Starbuzz Bean Machine </h1>
<h2> Fill out the form below and click “order now” to order </h2>
All we've got so far is a
heading identifying the page,
along with instructions.
The fo rm is
going to go h ere.
F or no w, w e're goin g to build th ese
fo rms with out all t he s tyle we'v e bee n
u sing on t he S tarb uzz site. Tha t
w ay, w e ca n co ncen trat e on the form
H TML . W e'll a dd t he s tyle in la ter.
Figuring out what goes in the form element
It's time to add your very first <form> element. The first thing you have to know
when creating a <form> element is the URL of the server script that is going to
process your form data. We've already taken care of that for you; you'll find the
server script that processes Starbuzz orders here:
…and to the proc essorder.p hp server
script t hat's on the serve r there.
This ser ver script already knows
how to take ord ers from the form
we're go ing to bu ild.
Search WWH ::

Custom Search