Specifications

unset($normal_user);
unset($admin_user);
}
This snippet of code disposes of the session variables and destroys the session. Notice that it
also unsets the $action variablethis means that we enter the main case statement without an
action, triggering the following code:
case ‘’:
{
if(!check_logged_in())
display_login_form($action);
break;
}
This will allow another user to log in, or allow the user to log in as someone else.
Implementing Administrative Functions
If someone logs in as an administrator, she will get some additional menu options, which can
be seen in Figure 28.10.
Building Practical PHP and MySQL Projects
P
ART V
692
FIGURE 28.10
The administrator menu allows for mailing list creation and maintenance.
34 7842 CH28 3/6/01 3:46 PM Page 692