Print Page | Close Window

Login not working correctly...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4362
Printed Date: 30 March 2026 at 8:04am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Login not working correctly...
Posted By: jrockfl
Subject: Login not working correctly...
Date Posted: 19 July 2003 at 5:15pm

When I try to login, it keeps saying my password is incorrect. I am trying to set the userid as a session variable. This field is autonumber in an access database. Here is the code I am using. I have added one user to the database. Any ideas?

<%
 Response.Buffer = True
 Dim objConn, objRS
 Session.Contents("userid") = ""
 Set objConn = Server.CreateObject("ADODB.Connection")
 objConn.Open "DSN=survey"
 Set objRS = objConn.Execute("SELECT * FROM tblusers WHERE username = '" & _
  Request.Form("username") & "'")
 If Not objRS.EOF Then
  If objRS(1) = Request.Form("password") Then
  Session.Contents("userid") = objRS(2)
  Response.Redirect "menu.asp"
  Else
  Response.Write "Sorry, but the password that you entered is incorrect."
  End If
 Else
  Response.Write "Sorry, that username does not exist."
 End If
 objRS.Close
 Set objRS = Nothing
 objConn.Close
 Set objConn = Nothing
%>

 




Replies:
Posted By: jrockfl
Date Posted: 19 July 2003 at 7:00pm

in the database my username = jason and my password = jason

It will let me login if my password = Jason with a capital "J"

Any ideas to correct this?



Posted By: jrockfl
Date Posted: 19 July 2003 at 7:06pm
Ok..its not pullling querying the password field in the db, it is querying from firstname instead



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net