Z
zblichao
Unregistered / Unconfirmed
GUEST, unregistred user!
我在sql的数据库中的password=123 表单提交的password也是123
为什磨sql取出的 password 不等于表单提交的password 是不是数据类型不同?
<% @ language=vbscript%>
<!-- #include virtual="/try/gen.inc" -->
<%
dim username
dim password
dim datacon
dim rs
username=request.form("username")
password=request.form("password")
set datacon=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
datacon.connectiontimeout=20
datacon.open"dsn=login","login","login"
if Request("sel_main")=5 then
sqlquery="select * from login_admin where username="&sqlstr(username)
set rs=datacon.execute(sqlquery,nrow)
if rs.eof=true then
response.write("usernameerror")
end if
if rs("password")=password then
response.write("passworderror")
end if
response.redirect "index.htm"
end if
%>
为什磨sql取出的 password 不等于表单提交的password 是不是数据类型不同?
<% @ language=vbscript%>
<!-- #include virtual="/try/gen.inc" -->
<%
dim username
dim password
dim datacon
dim rs
username=request.form("username")
password=request.form("password")
set datacon=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
datacon.connectiontimeout=20
datacon.open"dsn=login","login","login"
if Request("sel_main")=5 then
sqlquery="select * from login_admin where username="&sqlstr(username)
set rs=datacon.execute(sqlquery,nrow)
if rs.eof=true then
response.write("usernameerror")
end if
if rs("password")=password then
response.write("passworderror")
end if
response.redirect "index.htm"
end if
%>