View Full Version : Usernames and Passwords
megula 07-05-2003, 08:35 PM Hey! Well, for my site, I want the visitors to be able to sign up for an account, and login to their regular accounts.
So, that means that they have to sign up to have an account, and password. How do I get the javascript to make one of those on my page?
Thanks for helping me out!
christiandude03 07-05-2003, 08:41 PM You generally don't want to use javascript to accomplish something like this, as it does not have the power and security of server-side software such as perl, php, cold fusion, asp, jsp, and any other languages I forgot.
buffyfan 07-06-2003, 08:30 PM Originally posted by megula
Hey! Well, for my site, I want the visitors to be able to sign up for an account, and login to their regular accounts.
So, that means that they have to sign up to have an account, and password. How do I get the javascript to make one of those on my page?
Thanks for helping me out!
there is a site for javascript called.http://javascript.internet.com/ it might have what your looking for
megula 07-07-2003, 05:52 PM I tried that out and there is no way they my future members can sign up, and the code is really strange. Could you help me out with the code? Here it is:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
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!");
}
}
// End -->
</SCRIPT>
That is the header, this is the body:
<BODY>
<center>
<form><input type=button value="Login!" onClick="LogIn()"></form>
</center>
Coconut99 07-07-2003, 07:01 PM You can't use Javascript to automatically sign people up for accounts and be able to login to protected areas of a site. You have to use a server-side language. (Javascript is a client-side language.) For instance, you could use PHP and a mySQL database to store your users info or use a flatfile database. (I'm not sure about ASP and CGI/Perl, etc.) Sorry! I hope you find something that works, though.
buffyfan 07-07-2003, 07:36 PM try www.bravenet.com that has it i am sure.
hope have helped
bellportal 07-10-2003, 01:53 PM NEVER use javascript for password protection. It is very easy to hack into and to crack the password(s).
Take the advice of other people, use something PHP or ASP.
HTH,
Anzrew 07-26-2003, 02:51 PM I use this site for a simple but clever login, its quite secure. i think it uses php and asp etc.. though
http://www.brinkster.com/CodeBank Search "Login"
Thanks Anzrew:)
EDIT = Search "Login"
megula 07-26-2003, 04:22 PM Okay, thanks ALOT! I got it! :)
|