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. ...