I know this method is not safe, but I'm only using it with a couple of friends, I'm using JS to validate a User and Password to redirect to another page, and it works with 1 User, but I don't know how to add another user, the code is this:
<div class="login-page">
<div class="form">
<form name="login" class="login-form">
<input name="userid" type="text" placeholder="Usuario"/>
<input name="pswrd" type="password" placeholder="Contraseña"/>
<input id="button" onClick="check(this.form)" value="Login"/>
</form>
</div>
</div>
<script language="javascript">
function check(form) {
if(form.userid.value == "USER1" && form.pswrd.value == "PASSWORD1") {
location.href = "Inicio";
}
else {
alert("El usuario o la contraseña son incorrectos, intente nuevamente")
}
}
</script>
Thanks in advance