USE THIS CODE CARFULY
HTML Code:
<html> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function LogIn(){ loggedin=false; username=""; password=""; username=prompt("Username:",""); username=username.toLowerCase(); password=prompt("Password:",""); password=password.toLowerCase(); if (username=="guest" && password=="login") { loggedin=true; window.location="home-page.html"; } if (username=="guest2" && password=="login2") { loggedin=true; window.location="home-page2.html"; } if (loggedin==false) { alert("Invalid login!"); } } </SCRIPT> <BODY> <center> <form><input type=button value="Login!" onClick="LogIn()"></form> </center> </body> </html>