asp+access网页登陆验证用户页面代码有问题,求助各位大仙~!
发布网友
发布时间:2024-10-12 03:07
我来回答
共2个回答
热心网友
时间:2024-11-15 10:59
<!--#include file="conn.asp" -->
<%
uname=request.Form("uname")
psd =request.Form("psd")
exec="select * from user where(uname='" & uname &"' and psd ='" & psd &"')"
set rs=server.CreateObject("adodb.Recordset")
rs.open exec,conn,1,1
if not rs.eof then
session("uname")=request.Form("uname")
session("checked")=2
Response.Redirect("user_index.asp")
else
Response.Write("<script languge='javascript'>alert('用户名或密码错误,请重新输入!'); window.location.href='../login.asp'</script>")
end if
%>
热心网友
时间:2024-11-15 11:00
sql语句最后写漏了psd吧?