Prev | Current Page 48 | Next

Larry Ullman

"Building a Web Site with Ajax: Visual QuickProject Guide"


To begin, we??™ll start by creating the HTML form that takes all the requisite
data. Then we??™ll write the PHP script that handles the form submission in a
non-Ajax way. This will all be fairly basic PHP form handling.
4. adding records
43
what we??™ll do
1 First, on pages 45-48, we??™ll
create an HTML page with a
form.
The form has elements
representing all of the data
that??™s stored in the database
for each employee.
On non-Ajax-enabled browers,
when the user clicks Add,
the form will be submitted
to a PHP script.
2 On pages 49-54, the PHP
script that handles the HTML
form will be written. The script
validates the form data and
reports on the results.
If any fi elds weren??™t properly
fi lled out, the PHP script prints
an error message.
3 Naturally, we??™ll test what
we??™ve built to make sure it all
works.
At the end of this chapter, in the
extra bits section, you??™ll fi nd more
information, tips, and recommendations
regarding all these steps.
In the next chapter, we??™ll add the
Ajax layer to these pages.
44 adding records
start the HTML page
Start by creating a new HTML page in your HTML editor.


Pages:
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60