登錄次數的問題!
<%names=request.form("use")
pwd=request.form("pwd")
dim conn
dim connstr
c&server.mappath("data\bb.mdb")
set conn=server.createobject("adodb.connection")
conn.open connstr
ssql="select * from userss where names='"&names&"'"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open ssql,conn,1,3
if pwd<>rs("pwds") then
response.write "<link rel='stylesheet' type='text/css' href='style.css'>"
response.write "<body bgcolor='#ffffef'>"
response.write "Sorry,請輸入正確的用戶名和密碼 =====<a href=default.asp>返回</a>====="
rs.close
response.end()
end if
ssql="update userss Dcount=Dcount+1 where names='"&names&"'"
application.lock()
rs.open ssql,conn,1,3
application.Unlock()
session("nana")=rs("TruName")
session("keke")=rs("oss")
response.redirect "default2.asp"
rs.close
%>
數據庫中的Dcount不加1.別的地方都沒有問題.也不報錯.
這個是我抄別人的.請各位幫下忙