4. User Accounts

The next step in the evolution of the “Knowledge Is Power” e-commerce site is to create a system of user accounts. When the site is complete, PayPal will be the crucial part in the registration process, but just to understand the user account system on its own, as well as to be able to create an administrative user for the next chapter, let’s look at user accounts as a separate entity first.

There are four primary facets to the implementation of user accounts in this chapter. First, a new user registers. Second, a registered user logs in. Third, the logged-in user logs out (in theory, many people, including me, don’t always do so). Fourth, users need to be able to retrieve a forgotten password and change an existing password. ...

Get Effortless E-Commerce with PHP and MySQL, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.