W
williamguo188
Unregistered / Unconfirmed
GUEST, unregistred user!
第一段代碼
<!--#include file="conn.asp"
-->
<% username=request("textfield1"
passpwd=request("textfield2"
session("username"=username
sql="select * from[user] where username='"&username&"'and password='"&passpwd&"'"
set rs=server.createobject("adodb.recordset"
rs.open sql,conn,3,3
if rs.eof then
response.redirect"erro.asp"
else
response.redirect "main.asp"
end if
%>
測試總是連接到erro.asp
那里出錯了?
請指教?
第二段代碼
<!--#include file="conn.asp"
-->
<% username=request("textfield1"
passpwd=request("textfield2"
session("username"=username
sql="select username,password from usertable where username='''&username&'''and password='''&password&'''"
set rs=server.createobject("adodb.recordset"
rs.open sql,conn,1,1
if rs.RecordCount > 0 then
response.redirect"home.asp"
else
response.redirect "erro.asp"
end if
%>
我測試總是不能接連到home.asp
請問那里出錯了?
<!--#include file="conn.asp"
-->
<% username=request("textfield1"
passpwd=request("textfield2"
session("username"=username
sql="select * from[user] where username='"&username&"'and password='"&passpwd&"'"
set rs=server.createobject("adodb.recordset"
rs.open sql,conn,3,3
if rs.eof then
response.redirect"erro.asp"
else
response.redirect "main.asp"
end if
%>
測試總是連接到erro.asp
那里出錯了?
請指教?
第二段代碼
<!--#include file="conn.asp"
-->
<% username=request("textfield1"
passpwd=request("textfield2"
session("username"=username
sql="select username,password from usertable where username='''&username&'''and password='''&password&'''"
set rs=server.createobject("adodb.recordset"
rs.open sql,conn,1,1
if rs.RecordCount > 0 then
response.redirect"home.asp"
else
response.redirect "erro.asp"
end if
%>
我測試總是不能接連到home.asp
請問那里出錯了?