Advertisement

01.04.2005 at 07:42AM PST, ID: 21261211
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

ASP Login Remember me tick box

Asked by ExtremeD in Active Server Pages (ASP)

Tags: ,

I wonder if someone can help me....

I have some ASP code which is used so that users can login to a secured section of the website
I have an access database with all the usernames and passwords.

On my main homepage I have two fields Patients ID and Password
when a user clicks on submit the form action address checks an ASP page called "check_user.asp" which has the code below.

It all works perfectly normal, but i'd like to include a remember me checkbox which would allow a user to be remembered the next time they open the page.

Just not sure how it's done and if much work is needed?

I already have some session code placed at the top of the secured pages
<%
'If the session variable is False or does not exsist then redirect the user to the unauthorised user page
If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then
      'Redirect to unathorised user page
      Response.Redirect"notsignedin.asp"
End If
%>

this is my check_user.asp code.

<%
'Dimension variables
Dim adoCon       'Database Connection Variable
Dim strCon            'Holds the Database driver and the path and name of the database
Dim rsCheckUser       'Database Recordset Variable
Dim strAccessDB       'Holds the Access Database Name
Dim strSQL       'Database query sring
Dim strUserName       'Holds the user name

'Initalise the strUserName variable
strUserName = Request.Form("txtUserName")

'Check the database to see if user exsits and read in there password
'Initialise the strAccessDB variable with the name of the Access Database
strAccessDB = "D:\WWWRoot\domainname.co.uk\database\database.mdb"

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
                  
'Database connection info and driver
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=password123; DBQ=" & strAccessDB

'Set an active connection to the Connection object
adoCon.Open strCon

'Create a recordset objectj
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "'"

'Query the database
rsCheckUser.Open strSQL, strCon

'If the recordset finds a record for the username entered then read in the password for the user
If NOT rsCheckUser.EOF Then
     
     'Read in the password for the user from the database
     If (Lcase(Trim(Request.Form("txtUserPass")))) = Lcase(Trim(rsCheckUser("Password"))) Then
         
          'If the password is correct then set the session variable to True
          Session("blnIsUserGood") = True
         
          'Close Objects before redirecting
          Set adoCon = Nothing
          Set strCon = Nothing
          Set rsCheckUser = Nothing
         
          'Redirect to the authorised user page and send the users name
          Response.Redirect"https://ssl1.lon.gb.securedata.net/domainname.co.uk/authorisedservices.asp?name=" & strUserName
     End If
End If
            
'Close Objects
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
      
'If the script is still running then the user must not be authorised
Session("blnIsUserGood") = False

'Redirect to the unautorised user page
Response.Redirect"unauthorisedpage.asp"
%>

many thx Start Free Trial
[+][-]01.04.2005 at 07:45AM PST, ID: 12953076

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 07:46AM PST, ID: 12953084

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: me, remember
Sign Up Now!
Solution Provided By: leew
Participating Experts: 4
Solution Grade: A
 
 
[+][-]01.04.2005 at 07:49AM PST, ID: 12953119

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 07:49AM PST, ID: 12953129

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 07:54AM PST, ID: 12953192

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 09:23AM PST, ID: 12954241

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 09:29AM PST, ID: 12954307

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 09:46AM PST, ID: 12954460

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.04.2005 at 03:44PM PST, ID: 12957782

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2005 at 03:41AM PST, ID: 12960965

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.04.2005 at 10:01AM PST, ID: 13460992

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.23.2005 at 12:00PM PDT, ID: 13851237

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.28.2005 at 05:41PM PDT, ID: 13891252

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32