Specifications

Creating a New Account
If a user selects the New Account menu option, this activates the new-account action. This
activates the following code in index.php:
case ‘new-account’ :
{
unset($normal_user);
unset($admin_user);
display_account_form($normal_user, $admin_user);
break;
}
This code effectively logs out a user if they are currently logged in, and displays the account
details form as shown in Figure 28.5.
Building a Mailing List Manager
C
HAPTER 28
28
BUILDING A
MAILING LIST
MANAGER
673
FIGURE 28.5
The new account creation form enables users to enter their details.
This form is generated by the display_account_form() function from the output_fns.php
library. This function is used both here and in the account-settings action to display a form to
enable the user to set up an account. If the function is invoked from the account-settings
action, the form will be filled with the users existing account data. Here the form is blank,
ready for new account details. Because this function only outputs HTML, we will not go
through it here.
34 7842 CH28 3/6/01 3:46 PM Page 673