davey
11-05-2003, 06:22 PM
here is my login code
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Login()
{var done=0
var username=document.login.username.value
username=username.toLowerCase()
var password=document.login.password.value
password=password.toLowerCase()
if (username=="goku" && password=="squib23") { window.location="member.php"; done=1; }
if (username=="vegeta" && password=="dirtmud56") { window.location="member.php"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
function disableRightClick(e)
{
var message = "Right click disabled";
if(!document.rightClickDisabled) // initialize
{
if(document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = disableRightClick;
}
else document.oncontextmenu = disableRightClick;
return document.rightClickDisabled = true;
}
if(document.layers || (document.getElementById && !document.all))
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
else
{
alert(message);
return false;
}
}
disableRightClick();
// End -->
</SCRIPT>
now how would i make a registration page that would insert
if (username=="what the user filled out for their name" && password=="what the user filled out for their password") { window.location="member.php"; done=1; }
into the login page without me havin to do anything
(btw i want my registration form to look like
<form name=register>
<table width=225 border=1 cellpadding=3>
<tr><td colspan=2><center>
<font size="+2" font color="#FF6600"><b>Register</b></font>
</center></td></tr>
<tr>
<td><font color="#FF6600">Character:</font></td>
<td><input type=text name=username></td></font></tr>
<tr>
<td><font color="#FF6600">Password:</font></td>
<td><input type=password name=password></td></font></tr>
<tr><td colspan=2 align=center><input type=button value="Register" onClick="Register()"></td></tr>
</table>
</form>
^--that any help at all would be greatly appreciated
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Login()
{var done=0
var username=document.login.username.value
username=username.toLowerCase()
var password=document.login.password.value
password=password.toLowerCase()
if (username=="goku" && password=="squib23") { window.location="member.php"; done=1; }
if (username=="vegeta" && password=="dirtmud56") { window.location="member.php"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
function disableRightClick(e)
{
var message = "Right click disabled";
if(!document.rightClickDisabled) // initialize
{
if(document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = disableRightClick;
}
else document.oncontextmenu = disableRightClick;
return document.rightClickDisabled = true;
}
if(document.layers || (document.getElementById && !document.all))
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
else
{
alert(message);
return false;
}
}
disableRightClick();
// End -->
</SCRIPT>
now how would i make a registration page that would insert
if (username=="what the user filled out for their name" && password=="what the user filled out for their password") { window.location="member.php"; done=1; }
into the login page without me havin to do anything
(btw i want my registration form to look like
<form name=register>
<table width=225 border=1 cellpadding=3>
<tr><td colspan=2><center>
<font size="+2" font color="#FF6600"><b>Register</b></font>
</center></td></tr>
<tr>
<td><font color="#FF6600">Character:</font></td>
<td><input type=text name=username></td></font></tr>
<tr>
<td><font color="#FF6600">Password:</font></td>
<td><input type=password name=password></td></font></tr>
<tr><td colspan=2 align=center><input type=button value="Register" onClick="Register()"></td></tr>
</table>
</form>
^--that any help at all would be greatly appreciated