Specifications

Changing Passwords
If a user follows the Change Passwordmenu option, he will be presented with the form
shown in Figure 24.7.
Building User Authentication and Personalization
C
HAPTER 24
24
AUTHENTICATION
AND
PERSONALIZATION
519
FIGURE 24.7
The change_passwd_form.php script supplies a form where users can change their passwords.
This form is generated by the script change_passwd_form.php. This is a simple script that just
uses the functions from the output library, so we have not included the source for it here.
When this form is submitted, it triggers the change_passwd.php script, which is shown in
Listing 24.15.
LISTING 24.15 change_passwd.phpThis Script Attempts to Change a User Password
<?
require_once(“bookmark_fns.php”);
session_start();
do_html_header(“Changing password”);
check_valid_user();
if (!filled_out($HTTP_POST_VARS))
{
echo “You have not filled out the form completely.
Please try again.”;
30 7842 ch24 3/6/01 3:34 PM Page 519