<%
Dim usernames,passwords,level,FirstName,UserName,InchargeID
if request.form("UserName") <> "" And request.Form("Password") <> "" then UserName = request.Form("UserName")
passwords = request.Form("Password")
level = request.Form("level")
strsql = "select * from User where UserName='"& UserName & "' and Password= '"& passwords &"' and level= '"& level &"'"
set rslogin = server.createobject("adodb.recordset")rslogin.open strsql, conn, 1, 2
If Not rslogin.eof Then level = rslogin("level")
session("level") = level 'เก็บค่า level
session("UserName") = rslogin("UserName") 'เก็บค่า username 'ตรวจสอบ level
if level = 1 then response.Redirect("Default_Budgets.asp") elseif level = 2 then response.Redirect("ShowDep_Admin.asp")
elseif level = 3 then response.Redirect("ShowDep_Administrator.asp")
else response.Redirect("Webmaster_ShowAll_Actual.asp")
end if
Else response.Write("<font color=red>! </font><font color=red size=1>UserName,Password and Access Level is wrong</font>")
End if
End if
%>
=== ส่วนที่ code error ===
Error Type:
Microsoft Office Access Database Engine (0x80040E14)
Syntax error in FROM clause.
/sutt_budgets_v.2/Loginform_THAI_V2.asp, line 286