3.3. Building the Login Web Page
Customers log into your protected Web site via an HTML form on a Web page. The login application design, developed earlier in the section "Designing the Login Application," calls for two forms: one to allow new customers to register and another to allow registered customers to log in. You need to develop the login Web page, making decisions on its functionality and its look and feel.
3.3.1. Designing the login Web page
In your Web travels, you've probably seen many different designs for a login page. You might already have ideas for your login page. The design presented here is simple, with very little style. You'll undoubtedly want to change it to match your Web site's look and feel.
In this design, both forms are presented on a single Web page. The forms are displayed in two sections, side by side. Each form has its own section heading, form fields, and submit button. The Login Form allows people to enter a username and password; the Registration Form requests much more information from the customer. Figure 3-1 shows what the login Web page looks like when it's displayed in a browser.
The code for the login Web page is stored in a separate file that's included when the application needs to display the login page. Thus, the code that defines the Web page is separate from the PHP code that provides the logic of the application.
The code for the login page consists of two files: the code that defines the look and feel of the page and the code that ...
Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.