This is a neat password protection script that uses the password prompt as a barrier between the source of the page. There is not a single second that the person viewing the page can look at the source.
Set up this quick and easy password protection script in minutes. Choose your desired login Username and Password, and require that your visitor's enter the information before accessing any HTML page. It is not recommended that this script be used to protect anything extremely private.
This program dynamically encrypts the password to a page (differently each time) before saving it, making it a lot harder for foul-minded users to break in. In addition, the program does not simply take the surfer to the file he/she enters as the password. Instead, it navigates to a page only if the surfer correctly enters the password. Invalid passwords will result in an "invalid password" alert.
You can use a basic cookie script to keep visitors (that don't have the cookie on their system) from viewing certain parts of your site (kind of.... There are always ways around it). The cookie is placed when the password provided is correct. Then, when they are forwarded to the password protected page, the cookie allows them to stay. Those without the cookie are sent back.