I am using the similar code on chapter 15 but i only have modified the
variable names and names in the database, but strangely i am getting the
following error:
Microsoft JET Database Engine error '80040e14'
Syntax error in FROM clause.
/Testing/CheckLogin.asp, line 11
Here is my coding for CheckLogin.asp
<!--#include file = "DataStore3.asp" -->
<%
Dim strEmail, strPassword
strEmail = Request("Email")
strPassword = Request("Password")
Dim rsUsers
Set rsUsers = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM User WHERE EMailAddress = '" & strEmail & "';"
rsUsers.Open strSQL, objConn
If rsUsers.EOF Then
Session("EMailAddress") = Request("EMail")
If Request("SecondTry") = "True" Then
Response.Redirect "register.asp?NotFound=True"
Else
Response.Redirect "login.asp?SecondTry=True"
End If
Else
While Not rsUsers.EOF
If UCase(rsUsers("Password")) = UCase(strPassword) Then
Dim strName, strValue
For Each strField in rsUsers.Fields
strName = strField.Name
strValue = strField.value
Session(strName) = strValue
Next
Session("blnValidUser") = True
Response.Redirect "MenuForRegisteredUsers.asp"
Else
rsUsers.Movenext
End If
Wend
Session("EmailAddress") = Request("EMail")
If Request("SecondTry") = "True" Then
Response.Reddirect "register.asp"
Else
Response.Redirect "login.asp?SecondTry=True&WrongPW=True"
End If
End If
%>