Asp+access中、会员登陆时检查表单的代码怎么写

2025-03-06 21:26:27
推荐回答(1个)
回答1:

<%
if
sql="select * from [表名] where 会员名字段='"&提交会员名&"' and 密码字段='"&提交密码&"'"
set rs=conn.execute(sql)
if rs.eof or rs.bof then
response.Write "alert('用户或密码错误,请查实!');history.go(-1);"
response.end
end if
%>

就是简单的asp判断语句,如果提交的账户和密码跟ACCESS里的不一样,就提示错误。