Site hosted by Angelfire.com: Build your free website today!

usernames: username1 username2 password2

passwords: password1 password2 password3

Script is as follows:

head section:

function LetUserIntoPage()
{
var username = prompt("Please enter your username:", "");
var password = prompt("Please enter your password:", "");
var TheLists = new Array(3)
{
TheLists[0] = "username1:password1";
TheLists[1] = "username2:password2";
TheLists[2] = "and so on:and so on";
}
for (i = 0; i < TheLists.length; i++)
{
if (TheLists[i].indexOf(username) == 0)
{
var TheSplit = TheLists[i].split(":");
var TheUsername = TheSplit[0];
var ThePassword = TheSplit[1];
if (username == TheUsername && password == ThePassword)
{
alert("Welcome, " + username);
// Your other commands here
}
}
}
}

Body section:

Append to body tag:

onload="LetUserIntoPage();"

END

Free JavaScripts provided
by The JavaScript Source