Activating an Account

A new feature I’ve added to this registration example in this edition of the book is the activation process. When a person registers, an activation code will be associated with their account. This will also be sent as a link in the registration confirmation email.

The user then has to click the link in the email, which will take them to the site’s activation page. The link will pass to the activation script the user’s ID number and the activation code. If these two values match those in the database, the activation code will be removed from the record, indicating an active account. The login page, developed next, will allow only users who have activated their account to log in.

To create the activation page

1.
Begin a ...

Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.