G
Graham Campbell
I have a login script to a website where a user logs in through a
standard webform with a username and password that needs to be
validated. My problem is that IE6 doesn't seem to pick up on valid
username/password combinations and instead of forwarding the user to the
next page dumps them back at the login page.
My verification script is below:
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
user = trim(Request.form("username"))
password = trim(Request.form("password"))
if user = "" or password = "" then
Response.Write "please enter username and password"
else
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Mode=ReadWrite;
Persist Security Info=True; Data Source=" &
Server.MapPath("member.mdb")
set my_conn= Server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.RecordSet")
my_conn.Open ConnString
rs.open "Select * from member where Name ='" & user & "' and
Password='" & password & "'", my_conn
if rs.eof then
Response.Write("Invalid Username/Password")'redirect invalid_page
'invalid password and redirect to login page
else
session("login") = "yes"
session("name") = rs("name")
'session("...") = rs("...")
' add session ..if you want to keep profile of your user.
Response.redirect valid_login
end if
rs.Close
my_conn.close
set my_conn = nothing
end if
%>
This all works fine in other browsers such as Firebird and Opera, even
earlier versions of IE work fine but I can't figure out whats wrong. I
would be most greatful for any assistance.
I'm rather new to ASP, so if my problem is glaringly obvious please
don't beat down on me too hard
Regards
Graham
standard webform with a username and password that needs to be
validated. My problem is that IE6 doesn't seem to pick up on valid
username/password combinations and instead of forwarding the user to the
next page dumps them back at the login page.
My verification script is below:
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
user = trim(Request.form("username"))
password = trim(Request.form("password"))
if user = "" or password = "" then
Response.Write "please enter username and password"
else
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Mode=ReadWrite;
Persist Security Info=True; Data Source=" &
Server.MapPath("member.mdb")
set my_conn= Server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.RecordSet")
my_conn.Open ConnString
rs.open "Select * from member where Name ='" & user & "' and
Password='" & password & "'", my_conn
if rs.eof then
Response.Write("Invalid Username/Password")'redirect invalid_page
'invalid password and redirect to login page
else
session("login") = "yes"
session("name") = rs("name")
'session("...") = rs("...")
' add session ..if you want to keep profile of your user.
Response.redirect valid_login
end if
rs.Close
my_conn.close
set my_conn = nothing
end if
%>
This all works fine in other browsers such as Firebird and Opera, even
earlier versions of IE work fine but I can't figure out whats wrong. I
would be most greatful for any assistance.
I'm rather new to ASP, so if my problem is glaringly obvious please
don't beat down on me too hard
Regards
Graham