68
Chapter 2
Solving the pizza delivery problem
Fortunately, web developers have been solving these sorts of problems for years.
Instead of letting users enter their own address (and type something incorrectly),
let’s look up the customer’s address in the Break Neck customer database. Then,
Alex will always get the right delivery address. Here’s what we can do:
Customer’s phone number
The new
form has the
customer’s phone
and address
already lled in.
The customer enters their phone number
Customer’s
phone number
A customer enters his phone number, and the phone
number gets sent to Break Neck’s web server.
The server lls in the customer’s details
The server sends back a new form, with the customer’s name,
phone number, and address already entered into the HTML.
New HTML with
customer info lled in
Break Neck’s server
1
2
The customer can make sure his
address is right, but shouldn’t have
to type it in manually, and run the
risk of making mistakes.
old skool web apps