In keeping with this book??™s approach, we??™ll start, in this chapter, with the non-Ajax
version. These fi les will work for all users and give us a sense of what the process
should entail. To create the search, we only need to put together two fi les: one
HTML form and one PHP script that handles the form. Should be a snap!
6. creating a search
87
what we??™ll do
1 First, on pages 89-91, we??™ll create an HTML page with a form.
The form has only one
input: a text box where an
employee??™s last name, or part
thereof, can be entered.
On non-Ajax-enabled browers, when the user clicks GO,
the form will be submitted to a PHP script.
2 On pages 92-95, the PHP script that handles the HTML form will be
written. The script uses the form data to perform a search on the database,
printing the results.
If no employees match
the search term, the PHP
script prints a message
saying as much.
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 of these steps.
Pages:
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89