Support Forums

Full Version: Password Protection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HEllo..This is a small tut for password protection script.
Quote:<script language="JavaScript">
<!--

var username = prompt("Enter Username In the Box Below","")
var password = prompt("Enter Password In the Box Below","")

if (username !="USERNAME HERE" || password !="PASSWORD HERE")

{ top.location="about:Bad Username and/or Password" }
//-->
</script>
Thanks for it, but people can find your password easily by viewing your source :/
Perhaps you can use it with the "Disable Right Click" script so that it will be protected Smile
You could protect it by inserting it in a PHP script but I am not sure never did that before and use the include function.
I have posted the disable right click script before.
Not good. Use .htaccess to do this.
Disabling right click is not enough if you ask me.
he can use ht.access but what if he does not have a database?

by the way javascript is in stoneage now.. your visitors might get annoyed running throug every script error all the time they need an input..