Specifications
The four main sections to the script are as follows:
1. We do some processing that must take place before we send the page header to the
browser, such as starting the session, executing any preprocessing for the action the user
has selected, and deciding what the headers will look like.
2. We process and send the appropriate headers and menu bar for the action the user has
selected.
3. We choose which body of the script to execute, depending on the selected action. The
different actions trigger different function calls.
4. We send the page footers.
If you look briefly through the code for the script, you will see that these four sections are
marked with comments.
To understand this script fully, let’s walk through actually using the site action by action.
Logging In and Out
When a user loads the page index.php, he will see the output shown in Figure 27.2.
Building a Web-Based Email Service
C
HAPTER 27
27
BUILDING A
WEB-BASED
EMAIL
SERVICE
629
F
IGURE 27.2
The login screen for Warm Mail asks for your username and password.
33 7842 CH27 3/6/01 3:41 PM Page 629










