add this select statement to this asp
<%
Dim strUsername
Dim Pwd
strUsername = Request.form("uname")
Pwd = Request.form("pword")
MyPath=Server.MapPath("database.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath
query = "SELECT * FROM users WHERE username='"& strUsername &"' AND password='"& Pwd &"'"
set rs = conn.Execute (query)
if rs.eof then
response.write("&answer=failed")
else
Session("member") = rs("Id")
Session.Timeout = 20
response.write "answer=ok&"
end if
'close recordset
rs.close
set conn = nothing
set rs = nothing
%>
in this code, which successfully checks the username and password, how would it look with this statement in it..
SELECT * FROM users WHERE username = " & Request("uName")
basically this code called from Macromedia flash, and it successfully checks whether or not the login details are in my database.
what i want it to do is set up a session, so the user can log in... and dependin on wat they entered in the uname input box.. which they logged in from, it only loads their details.
|