PDA

View Full Version : Login/Password problems


gildash2
02-23-2004, 11:20 AM
<SCRIPT LANGUAGE="JavaScript">
function Getstats()
{
window.status=('Attempting to Login to user area.')
var AccId;
var iName;
AccId = document.iAccInput.iAccID.value;
iName = document.iAccInput.iName.value;
if (iName == "" || AccId == "")
{
alert(' You have forgotten to put either your:\n-Password\n-Login Name');
window.status=('Attempt to log in has failed');
}
else
{
if (iName == "Kaade" && AccId == "seaweed")
{
window.iframe.location="http://www.yahoo.com";
window.status=('Hello '+iName+'. Welcome');
document.getElementById('guest').value = iName;
alert('Password is correct\ncongrats.\n');
}
else
{
alert('Password is incorrect\nTry again.\n');
window.iframe.location="http://www.google.com";
window.status=('Attempt to log in has failed');
}
}
}


</SCRIPT>

</HEAD>
<table border="1" bordercolor="ff0000" height="16" width="50"style="position:absolute; top:112px; left:743px" cellspacing="0" cellpadding="0" bgcolor="ff0000"><td bgcolor="0000" bordercolor="ff0000" width="50" height="15"><font color="0" size="1"><a href=".html" style="cursor: crosshair">_____Registration_____</a></font></td></table>
<FORM NAME="iAccInput" target="iframe">
<CENTER>
<TABLE style="position:absolute; top:45px; left:743px"
BORDER="1" bordercolor="ff0000" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000"><tr><td bgcolor="ff0000" width="50"><font color="000" size="1"><center>Login:</center></font></caption>
</td></tr><TR>
<TD ALIGN="RIGHT"><FONT SIZE="1" COLOR="#FF0000">User
Name:</FONT><BR><BR>
<FONT SIZE="1" COLOR="#FF0000">Password:</FONT></TD>
<TD><INPUT TYPE="TEXT" style="border: solid 2px #ff0000" size="10" style="background:0" style="color:ff0000" NAME="iName" MAXLENGTH="15"><br>
<INPUT style="border: solid 2px #ff0000" width="5" size="10" style="background:0" style="color:ff0000" NAME="iAccID" MAXLENGTH="15" HEIGHT="30"></TD>
<TD><INPUT style="border: solid 2px #000000" TYPE="BUTTON" VALUE=" Login " style="background:0" onClick="Getstats()" style="color:ff0000" HEIGHT="40" WIDTH="30"><BR>
<INPUT style="border: solid 2px #000000" TYPE="RESET" size="5" style="background:0" style="color:ff0000" VALUE=" Reset " onClick="window.status=('RESET: Please enter your USERNAME and ACCOUNT ID.')" WIDTH="50">
</TD></TR></TABLE></CENTER>
sorrry for the legnth of the code above, but i have got to ask this question because it is literally driving me insane, you know, coo coo ca ca. i wrote the code above earlier today but i have two problems with it, first: the password does not appear as ****** when typed. second: if someone looks at the code, it would be easily bipassed, so wat i need from you experts is, please, a code to help with both of my problems, the first being to make the password appear as **** when written in the password box, and second a security method that would help me hide the password and logins from some1 who would be looking at the source
thank you and all and any help will be appreciated thank u

scoutt
02-23-2004, 11:30 AM
ok first to fix the password.

<INPUT type="password" style="border: solid 2px #ff0000; background:0; color:#ff0000" size="10" NAME="iAccID" MAXLENGTH="15" HEIGHT="30">

add the bold. and you can only have 1 style attribute.

second, you cannot use javascript to make it secure. like you said it is easily bypassed. the only way to do that is some serverside language like asp, php, cgi. pick the one your server will run and go with it.

gildash2
02-23-2004, 11:34 AM
how exactky would i go about doing that?

scoutt
02-23-2004, 12:10 PM
doing what? useing serverside langauge. you read. that is all you can do. you have to learn a new language to program with.

you might be able to search www.hotscripts.com and find a member login of sorts, but my guess is that you will have to code it yourself.

gildash2
02-23-2004, 12:17 PM
ide rather not look at pre made scripts if i dont know wat they mean, but wat i need ur help in scott is where i can find what languages my server can use, and from there i would appreciate if you could give me some website that offer in depth tutorials on that language

scoutt
02-23-2004, 12:21 PM
you would have to ask your HOST on what languages they offer. I cannot tell you that.

then once you find out then you can search google on the specified language and go from there

mysite also has many tutorials you can look through depending on what language you choose.

link is in sig.