![]() |
#2
wearecs2009-12-21 22:41
|
判断用户可以,但是当判断密码时不行,也就是说,密码错误也可以登陆

reg_name = trim(checkstr(request("reg_name")))
reg_word = trim(checkstr(request("reg_word")))
qq="select * from user_bhss where user_bhss = '"®_name&"'"
set rs = conn.execute(qq)
if rs.eof then
response.write"<script>alert('对不起,没有此用户名');history.back();</script>"
response.end
else
if rs("pawd_bhss") <> reg_name then '这是判断密码的
response.write"<script>alert('密码错误');history.back();</script>"
response.end
else
session("bhss_reguser") = rs("user_bhss")
session("bhss_FifID") = rs("ID")
session.Timeout = 10
response.redirect"../Style/"
response.end()
end if
reg_word = trim(checkstr(request("reg_word")))
qq="select * from user_bhss where user_bhss = '"®_name&"'"
set rs = conn.execute(qq)
if rs.eof then
response.write"<script>alert('对不起,没有此用户名');history.back();</script>"
response.end
else
if rs("pawd_bhss") <> reg_name then '这是判断密码的
response.write"<script>alert('密码错误');history.back();</script>"
response.end
else
session("bhss_reguser") = rs("user_bhss")
session("bhss_FifID") = rs("ID")
session.Timeout = 10
response.redirect"../Style/"
response.end()
end if