Specifications

Well build a module for each box on this diagramsome will need one script and others,
two. Well also set up function libraries for
User authentication.
Bookmark storage and retrieval.
Data validation.
Database connections.
Output to the browser. Well confine all the HTML production to this function library,
ensuring that visual presentation is consistent throughout the site. (This is the function
API approach to separating logic and content.).
Well also need to build a back-end database for the system.
Well go through the solution in some detail, but all of the code for this application can be
found on the CD-ROM in the chapter24 directory. A summary of included files is shown in
Table 24.1.
TABLE 24.1 Files in the PHPBookmark Application
Filename Description
bookmarks.sql SQL statements to create the PHPBookmark database
login.php Front page with login form for system
register_form.php Form for users to register in the system
register_new.php Script to process new registrations
forgot_form.php Form for users to fill out if theyve forgotten their passwords
forgot_passwd.php Script to reset forgotten passwords
member.php A users main page, with a view of all his current bookmarks
add_bm_form.php Form for adding new bookmarks
add_bms.php Script to actually add new bookmarks to the database
delete_bms.php Script to delete selected bookmarks from the users list
recommend.php Script to suggest recommendations to a user, based on users
with similar interests
change_passwd_form.php Form for members to fill out if they want to change their
passwords
change_passwd.php Script to change the users password in the database
logout.php Script to log a user out of the application
bookmark_fns.php A collection of includes for the application
data_valid_fns.php Functions to validate user-input data
Building User Authentication and Personalization
C
HAPTER 24
24
AUTHENTICATION
AND
PERSONALIZATION
501
30 7842 ch24 3/6/01 3:34 PM Page 501