Specifications

Registering
To register a user, we need to get his details via a form and enter him in the database.
When a user clicks on the Not a member? link on the login.php page, they will be taken to a
registration form produced by register_form.php. This script is shown in Listing 24.5.
LISTING 24.5 register_form.phpThis Form Gives Users the Opportunity to Register with
PHPBookmarks
<?
require_once(“bookmark_fns.php”);
do_html_header(“User Registration”);
display_registration_form();
do_html_footer();
?>
Again, you can see that this page is fairly simple and just calls functions from the output
library in output_fns.php. The output of this script is shown in Figure 24.4.
Building User Authentication and Personalization
C
HAPTER 24
24
AUTHENTICATION
AND
PERSONALIZATION
507
FIGURE 24.4
The registration form retrieves the details we need for the database. We get users to type their passwords
twice, in case they make a mistake.
30 7842 ch24 3/6/01 3:34 PM Page 507