Easy Password Protection:

Directions for use:

1. Create the username/password combo:

   if(strstr($combine,"User1One")) {

In this example, username is User1 and the password is One
1a. Change these to suit, throughout the script.

2. Create the relevant directory(ies) in your webspace:

   include ("directory1/index.htm");

In this example you would need a directory named directory1 and an index page.
2a. Change these to suit throughout the whole script

3. Create an error page for people who get the username/password combo incorrect,
and reference this in the script variable $errorpage

NOTE:  This script is not as secure as other methods eg .htaccess/.htpasswd, it is
however more secure than any Javascript method.
    
That's it!  Easy!

Having problems with this script ?  Check out the dotdragnet Web Builder forum.

http://www.dotdragnet.co.uk
