Adding a username and password
Posted: Sun Jan 10, 2010 12:28 pm
Hello everyone,
This can also be found in the Javascript section as this does contain some javascriptviewtopic.php?f=88&t=941
I just wonna make 1 thing clear before we start the tourtrial. This code CAN be broken by hackers, you should also know that HTML is NOT secure so if you want a secure username/password try a .htaccess or a PHP but anyway I will show you how to do this anyway here is the code,
Second, Find the line
Tah Dah, all done
goto http://www.crazygaming.x10hosting.com/logintest.html and the username and password is
Username: codenstuff
Password: paralyzer
That is my website so,
Have fun with your login script
This can also be found in the Javascript section as this does contain some javascriptviewtopic.php?f=88&t=941
I just wonna make 1 thing clear before we start the tourtrial. This code CAN be broken by hackers, you should also know that HTML is NOT secure so if you want a secure username/password try a .htaccess or a PHP but anyway I will show you how to do this anyway here is the code,
Code: Select all
First, find the line's
<script language="javascript">
function pasuser(form) {
if (form.id.value=="USERNAME") {
if (form.pass.value=="PASSWORD") {
location="SUCCESS.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>
Code: Select all
and edit were it ses USERNAME to the username you want people to use in order to access the website and change were it ses PASSWORD to the password you want people to use in order to access the passworded pageif (form.id.value=="USERNAME") {
if (form.pass.value=="PASSWORD") {
Second, Find the line
Code: Select all
change SUCCESS to the page you want people to go to if the username and password is correct,location="SUCCESS.html"
Tah Dah, all done
goto http://www.crazygaming.x10hosting.com/logintest.html and the username and password is
Username: codenstuff
Password: paralyzer
That is my website so,
Have fun with your login script