Prev | Current Page 20 | Next

Larry Ullman

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

)
10 creating the database
This book??™s example contains three facets: browsing employees by department,
adding employees, and searching for employees by last name. For each section,
we??™ll create a non-Ajax version, and then apply the Ajax elements on top.
In this chapter, we??™ll make a non-Ajax way to browse employees. To do so, we??™ll
create one HTML page, two PHP scripts, and a CSS style sheet.
The non-Ajax pages can act as a model for how the Ajax layer should behave,
and more importantly, if anyone accessing this site cannot use the Ajax-enabled
pages, the site will still be fully functional for them. Also, two of the fi les generated
in this chapter??”one PHP script and the CSS document??”will be used by
all of this book??™s examples, Ajax and non-Ajax alike.
You may fi nd it easiest to follow along by fi rst downloading all the code from
the book??™s corresponding Web site (www.dmcinsights.com/ajax/).
2. browsing employees
11
what we??™ll do
1 First, on pages 13-14, we??™ll create a simple HTML form.
The HTML form will have a drop-down menu listing the departments.
These values will match those inserted into the database in
Chapter 1, ???creating the database.


Pages:
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32