[求助]为什么登录不上,又不显示错误呢?
我作的用函数来判断用户是否有登录记录的登录网页,加了函数判断后,即登录不了,又不报错,不知什么原因,想请各位前辈高人指教。函数代码和登录后的记录代码如下(其余省了)。函数代码:
Function checksysIswork() '用户登录检查
Set rs=Server.CreateObject("adodb.recordset")
Sql="SELECT * FROM kaoqing_table WHERE user='"&username&"' and recordYear="&Year(Now())&" and recordMonth="&Month(Now())&" and recordDay="&Day(Now())&""
rs.Open sql,conn,1,1
if rs.eof then
checksysIswork=FALSE
else
if Iswork=0 then
checksysIswork=TRUE
else
checksysIswork=FALSE
end if
End if
rs.close
conn.close
End Function
登记并记录代码:
If Session("level")=3 and checksysIswork="True" Then
set rs=server.createobject("adodb.recordset")
insertsql="select * from kaoqing_table"
rs.open insertsql,db,1,3
rs.addnew
rs("user")=username
rs("recordYear")=Year(Now())
rs("recordMonth")=Month(Now())
rs("recordDay")=Day(Now())
rs("recordTime")=Time
rs("Iswork")=1
rs("note")=note
rs.update
rs.close
set rs=nothing
Response.Redirect("normal.asp")
Response.End