13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

598 Chapter 27 Building User Authentication <strong>and</strong> Personalization<br />

Listing 27.22 add_bm()Function from url_fns.php—This Function Adds New<br />

Bookmarks to the Database<br />

<br />

The add_bm()function is fairly simple. It checks that a user does not already have this<br />

bookmark listed in the database. (Although it is unlikely that users would enter a bookmark<br />

twice, it is possible <strong>and</strong> even likely that they might refresh the page.) If the bookmark<br />

is new, it is entered into the database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!