是这样,我登陆时,用户名和密码正确,可它不是不执行。不知道是什么原因,哪位高手帮帮我,小弟想了很久都没有看出来错在哪里?
<!--#include file="Connections/yong.asp" -->
<%
dim rs
dim rs_numRows
set rs=server.createobject("adodb.recordset")
rs.activeconnection= MM_yong_STRING
rs.source= "select * from Users"
rs.Cursortype=0
rs.CursorLocation=2
rs.locktype=1
rs.open()
rs_numRows=0
%>
<%
rs.open "Users",1,3
dim username
dim password
username=CStr(request.Form("txtusername"))
password=CStr(request.Form("txtpassword"))
if rs.fields.item("Username").value=username and rs.fields.item("Password").value=password then
session("username")=username
response.write("<script>alert(""登陆成功!"");navigate(""index.asp"")</script>")
else
response.write("<script>alert(""密码不正确!"");navigate(""login.asp"")</script>")
rs.close
set conn=nothing
end if
%>
<%
rs.close()
set rs=nothing
%>
[此贴子已经被作者于2007-4-15 20:33:45编辑过]