Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 271
0 Users 4 Guests Online

Simple Password Protection for Small Sites

Code
<script language="JavaScript">
<!--hide
var password;
var pass1="bob"; <------------------ Replace "PASSWORD" with the actual password

password=prompt('enter password',' ');
if (password==pass1)
alert('correct password');
else
{
window.location="change this to a url";
}
//-->
</script>
Joshua
Author:
Views:
1895
Rating:
Posted on Wednesday 7th May 2008 at 02:03 AM
ShadowMage
ShadowMage
Unless you find a script like on Dynamic Drive in which encrypts them x]
Posted on Wednesday 7th May 2008 at 01:23 AM
DjMilez
DjMilez
Isn't really that secure because someone could just look at the source. But anyway, it's better than I could do myself :D