谢谢大家,我是zds309我把代码写上了
<%
set Conn = server.createobject("ADODB.Connection")
str="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("user.mdb")
Conn.Open str
u_name=request("name")
u_passwd=request("passwd")
if u_name=empty or u_passwd=empty then
response.write"用户名和密码不能为空"
response.end
else
set rs=server.createobject("ADODB.Recordset")
sql="select * from user where u_name='"&u_name&"'and u_passwd='"&u_passwd&"'"
rs.open sql,conn,2,2
If not rst.EOF Then
response.redirect("index.htm")'存在用户则登录成功
else
response.redirect("cuowu.asp")'否则错误提示
end if
end if
%>