Specifications

In addition to setting up the buttons we saw while not logged in, we add another button to
allow the user to log out again, as follows:
if(check_auth_user())
{
$buttons[4] = ‘log-out’;
}
You can see this Log Out button in Figure 27.3.
In the header stage, we again display the header and the buttons. In the body, we display the
status message we set up earlier:
echo $status;
After that, its just a case of printing the footer and waiting to see what the user will do next.
Setting Up Accounts
When a user first starts using the Warm Mail system, he will need to set up some email
accounts. If the user clicks on the Account Setup button, this will set the $action variable to
account-setup and recall the index.php script. The user will then see the output shown in
Figure 27.4.
Building Practical PHP and MySQL Projects
P
ART V
632
FIGURE 27.4
A user needs to set up his email account details before he can read his email.
33 7842 CH27 3/6/01 3:41 PM Page 632