Bone Posted February 14, 2006 Share Posted February 14, 2006 i've tried to do that:<% if request.form("usern")="rs.fields("usern")" and request.form("passw")="rs.fields("passw")" then session("user")="true" response.write "You Are Now Login As An User" else session("usern")="false" response.write "Wrong Password Or Username" end if%>its means that if some1 registered and his info is in the table of the access so he can loginits have a problem with that if..does its not correct?pls help me Link to comment Share on other sites More sharing options...
pulpfiction Posted February 14, 2006 Share Posted February 14, 2006 Try doing this, USERNAME = request.form("usern")PASSWORD = request.form("passw")SQL = "SELECT * FROM Table_Name, WHERE (fldUSERNAME ='" & USERNAME & "') AND (fldPASSWORD ='" & PASSWORD & "')"Set RS = MyConn.Execute(SQL) 'Execute queryIF NOT RS.EOF THEN 'Check if any record existsresponse.write "You Are Now Login As An User"ELSEresponse.write "Incorrect Login Info" Link to comment Share on other sites More sharing options...
Bone Posted February 14, 2006 Author Share Posted February 14, 2006 i've been tried its saying again that if is not good:if USERNAME ="'" & usern & "'" and PASSWORD ="'" & passw & "'" then session("user")="true"which if do i need to put? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now