Specifications

It would be more secure to give users a truly random passwordmade from any combination
of upper and lowercase letters, numbers, and punctuationrather than our random word and
number. However, a password like zigzag487 will be easier for our user to read and type than
a truly random one. It is often confusing for users to work out whether a character in a random
string is 0 or O (zero or capital O), or 1 or l (one or a lowercase L).
On our system, the dictionary file contains about 45,000 words. If a cracker knew how we
were creating passwords, and knew a users name, he would still have to try 22,500,000 pass-
words on average to guess one. This level of security seems adequate for this type of applica-
tion even if our users disregard the emailed advice to change it.
Implementing Bookmark Storage and Retrieval
Now well move on and look at how a users bookmarks are stored, retrieved, and deleted.
Adding Bookmarks
Users can add bookmarks by clicking on the Add BM link in the user menu. This will take
them to the form shown in Figure 24.9.
Building Practical PHP and MySQL Projects
P
ART V
526
FIGURE 24.9
The add_bm_form.php script supplies a form where users can add bookmarks to their bookmark pages.
Again, this script is simple and uses just the output functions, so we will not go through it
here. When the form is submitted, it calls the add_bms.php script, which is shown in Listing
24.21.
30 7842 ch24 3/6/01 3:34 PM Page 526