View Full Version : How can i make two diffrend login and password
03-02-2003, 11:58 AM
I cant make two diffrend Login and password I need 5 or 3 bat it only login to one of them and i dont know how to let it login to 3diffrend passwords and logins :confused: plz mail me or something :thumbsup:
03-02-2003, 03:19 PM
FIRST, I wouldn't use JS for password & login stuff (anyone clever enough to go to "View - > Source" will see the passwords), but anyway...
Suppose you have this script:
var passes = new Array();
var done = false;
passes = 'white';
passes = 'blue';
passes = 'red';
passes = 'green';
passes = 'black';
//got it? you can add as many passwords as you like; for now
//you have 5.
for (i=0; i<passes.length; i++)
if (document.login.login_field.value == passes[i])
window.location = "index.html";
if (i == (passes.length-1))
alert('The password you typed is wrong!\nTry again!')
<input name="login_field" type="text" size="30" maxlength="25" value="">
<input name="go" type="button" value="login" onclick="logMEin()">
If you have a password, enter it in the field above and press
the <b>login</b> button; <br>
<!-- by the way, that's for dummies -->
For your amusement, put a file called "index.html" in the same folder. Just to see that it works. Again, I SEE NO WAY to actually
use this without PHP, ASP or something.
JS login is just dust in the eyes, as a romanian expression says.
03-02-2003, 04:41 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.