|
Chapter 10
The Basics of Web Applications
In This Chapter
Understanding Web site security
Displaying static pages
Collecting information from users with HTML forms
Processing information received from users
P
HP was originally designed for Web programming, and although its use
for general-purpose scripts is growing, PHP is still used most frequently
to develop dynamic Web sites. StaticWeb pages — pages where all users see
the same Web page — don’t allow for interaction between the user and the
Web page. DynamicWeb pages, on the other hand, allow users to interact
with the Web page. Users may see different Web pages, based on information
they type into the Web page. For example, users might be required to type in
valid usernames and passwords before they can see any Web pages on the
Web site, allowing the site to customize Web pages based on users’ previous
preferences or profiles. Alternatively, users may select a type of product from
an online catalog and see only the Web pages containing products of the type
they select.
A dynamic Web page collects information from the user with an HTML form.
The information that the user types into the form is then processed, depend-
ing on what the information will be used for. The information may be stored
(see Chapter 12 for more on storing data using PHP) or used in a conditional
statement to display alternative Web pages.
In this chapter, I do not tell you about the HTML required to display a form; I
assume you already know HTML. (If you don’t know HTML or need a refresher,
check out HTML 4 For Dummies,4th Edition, by Ed Tittel and Natanya Pitts
[Wiley Publishing, Inc.].) What I do tell you is what you need to consider to
keep your Web site secure and how to use PHP to display HTML forms and to
process the information that users type into the form.
|