Password Verification

Results 1 to 5 of 5

Thread: Password Verification

  1. #1
    Freedom Guest

    Default Password Verification

    Hi,<BR><BR>I&#039m trying to do a password verification asp where all the information are stored in an Access database, but however, I have absolutely no idea how to do it, or where I should start. <BR><BR>Would really appreciate any help. Thanks in advance.

  2. #2
    Renea Finlay Guest

    Default RE: Password Verification

    Check out this article on this site Logins and Permissions, my buddy Peter wrote the article and it explains in detail how to achieve this, any question I will try to assist you....<BR><BR>Sincerely,<BR><BR>reneaatwork@home. com

  3. #3 Guest

    Default RE: Password Verification

    You need a page with a form containing:<BR>* TextField (Login)<BR>* Password Field (Password)<BR>* Submit Button<BR><BR>The form needs to be submitted to another page to accept the login values. This page should read the values and check them against either database, password file, or hardcoded values. If the values match then you set a session variable to the value of the Username, and redirect the user to the other pages. If the values do not match, then you redirect them back to the login page.<BR><BR>On all your other script pages that you want to restrict access for, you check the session variable. If it is blank then the user is not logged on and should be redirected to the login page. If the session var is set (not blank), then continue as normal.<BR><BR>You would also need a registration page where visitors can enter their details and start an account if you want to allow people to join online.

  4. #4
    Join Date
    Dec 1969

    Default RE: Password Verification

    Please explain what exactly you want source code or logic.

  5. #5
    Freedom Guest

    Default RE: Password Verification

    Hi, <BR><BR>Thanks for pointing out the great article to me. However, there are certain parts of the code which I still don&#039t really understand, hope that you&#039ll be able to help me.<BR><BR>As I&#039m still pretty new to ASP, do bear with me if my questions are of &#039beginner&#039 stuff. <BR><BR>The article suggests using status of logged in users to determine where they can and cannot go, like administrators and customers and stuff. I&#039ve looked at both the login.html and login.asp, but I can&#039t really find where this "status" is set. So how should I set this status? Set when the users register for the first time or can I use some sort of default? <BR><BR>Also, from the login.asp, which lines of code actually verifies the user&#039s password? <BR><BR>The code for login.asp is as follows:<BR>&#060;%<BR> Response.Buffer = True<BR> Dim objConn, objRS<BR> Session.Contents("status") = ""<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.Open "DSN=LoginTest;"<BR> Set objRS = objConn.Execute("SELECT * FROM Logins WHERE Username = &#039" & REquest.Form("txtUsername") & "&#039"<BR> If Not objRS.EOF Then<BR> If objRS(1) = Request.FOrm("txtPassword") Then<BR> Session.Contents("status") = objRS(2)<BR> Response.Redirect "menu.asp"<BR> Else<BR> End If<BR> Else<BR> Response.Write "Sorry, but the username does not exist."<BR> End If<BR> objRS.Close<BR> Set objRS = Nothing<BR> objConn.Close<BR> Set objConn = Nothing<BR>%&#062;<BR><BR>Many thanks in advance. ^_^<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts