Have them go to a login page........... username and password. When they
submit it read the db to see if they exist and if they have the correct
password.
strSQLstring = "SELECT * FROM YOurTable WHERE [Username] = '" &
LoginUsername.Text & "' And [Password] = '" & LoginPassword.Text & "'"
assign these to
Session("username")
Session("password")
Then redirect to you first page.
Response.Redirect ("HomePage.aspx")
Then in each page have it check to see if they are logged in example:
'Check if user is already logged in.
If Not Session("Username") = "" Then
LiteralLoginStatus.Text = Session("Username") & " logged in."
Else
LiteralLoginStatus.Text = "Your are currently not logged in."
Response.Redirect("Login.aspx")
End If
It took me tons of time to figure this out I hope it speeds it up for you.
Take care..........
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, June 18, 2005 2:32 AM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: [AspClassicAnyQuestionIsOk] LOGIN
Hi,
I am trying to put a very simple data-base (Microsoft ACCESS) driven
authentification page on one of my asp pages. I cannot seem to figure it
out. Anyone have ideas of where I might find a very simple script for
putting a username and password to protect your sight.
I am still pretty new at this so it needs to be simple. Very simple.
Thanks in advance.
Lorenzo Gunn
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/