<%
....
username=trim(request("username"))
password=trim(request("password"))
if(len(username)*len(password)<=0) then
response.write("username or password is empty!")
else
set rs=server.createobject("ADODB.recordset")
sqlstring="SELECT * FROM table WHRER username='"&username&"'and password='"&password&"'"
rs.open sqlstring,conn,1,1
if rs.eof then
response.write("用户名或者密码错误!")
response.redirect("index.asp")
else
response.redirect("manager.asp")
end if
end if
...
%>
上面只是简单的编程,不能作为最终实现代码,具体问题具体解决!
[此贴子已经被作者于2006-10-25 18:45:29编辑过]