ASP+access进行客户身份验证
ASP+access进行客户身份验证,大家帮我看看代码,我觉得这样做应该可以吧,kh_num是客户的号码,kh_pwd是密码输入提交后就是出现 用户名或密码错误!
<%
if trim(request.Form("num"))<>"" and trim(request.Form("kh_pwd"))<>"" then
dim a,kh_num,kh_pwd,sql,rs
kh_num=trim(request.Form("num"))
kh_pwd=trim(request.Form("kh_pwd"))
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from infor where kh_num='"&kh_num&"' and kh_pwd='"&kh_pwd&"'"
set rs=conn.execute(sql)
a=rs.recordcount
if a>0 then
Response.Write(" <script> alert( '登录成功! ') </script> ")
else
Response.Write( " <script> alert( '用户名或密码错误! ') </script> ")
end if
end if
%>