K
kanghs
Unregistered / Unconfirmed
GUEST, unregistred user!
那位高手教我一下,login.asp 用户/密码验证原先是用access数据库现改成sql server
2000却不行,找不到原因。下面是源代码:
dim rs
UserName1=request.form("username")
Password1=request.form("password")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from user where username='" &
UserName1 &
"'",conn,1
if Password1<>rs("password") then
response.write "<div align='center'><H5>Sorry,您所输入的名字或密码错误!</H5></div><br>"
else
session("username")=rs("username")
session("key")=rs("oskey")
response.redirect "manage1.asp"
end if
rs.close
2000却不行,找不到原因。下面是源代码:
dim rs
UserName1=request.form("username")
Password1=request.form("password")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from user where username='" &
UserName1 &
"'",conn,1
if Password1<>rs("password") then
response.write "<div align='center'><H5>Sorry,您所输入的名字或密码错误!</H5></div><br>"
else
session("username")=rs("username")
session("key")=rs("oskey")
response.redirect "manage1.asp"
end if
rs.close