O'Reilly logo

Practical Web Technologies by V. Lau, P. K. Yuen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

19.3. Putting encrypted passwords in databases

19.3.1. Creating an encrypted password table in MySQL

If your Web site has a large number of members, storing encrypted passwords in a file may not be efficient and may be difficult to maintain. In this case, a good alternative is to consider putting all passwords into a database. Since we already have some experience on the database package MySQL, we will set up a password table in MySQL and use it to protect a page.

In fact, putting user or member passwords into a database can have all the benefits of a database application. For example, the following features can be easily added or implemented as SQL statements:

  • Search password for a particular user.

  • Set up new member accounts with password. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required