customer login

L

Lynn

I am developing a web site in which I will have a
subscription service for which customers will have to log
in with a user name and password on the homepage to access
other information on the site. Since I am just a
beginning user, is there anyone who can tell me how I do
this. I have version 2002.
Thanks so much!
 
C

carmen

Sure Lynn:

Since you are a newbie, my suggestion is to use the
following code from JavascriptKit.com to set up a simple
password system. It is very easy and does not involve
authenticating against a database. Here's what you do:

Place the following code between your <BODY> tags. When
you cut and paste, make sure to paste into notepad, and
then copy and paste into your web page (in HTML view).
The password here is "hey" on line 8 of the code, so
change it as you wish. That's it.

<SCRIPT>
function passWord() {
var testV = 1;
var pass1 = prompt('Please Enter Your Password',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "hey") {
alert('You Got it Right!');
window.open('Page1.html');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Password Incorrect, Please Try
Again.','Password');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return " ";
}
</SCRIPT>
<CENTER>
<FORM>
<input type="button" value="Enter Protected Area"
onClick="passWord()">
</FORM>
</CENTER>

Have fun,
Carmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top