登陆页面
<%
if request.form("name")="" or request.form("password")="" then
%>
<%
else
function rp(s)
s=replace(s,"'","")
s=Replace(s,"<","")
s=Replace(s,">","")
s=Replace(s,"%","")
s=Replace(s,"&","")
s=Replace(s,";","")
s=Replace(s,":","")
s=Replace(s,"--","")
rp=s
end function
name=rp(request.form("name"))
password=rp(request.form("password"))
set pass=server.createobject("adodb.connection")
pass.open datalink
sql="select username,pwd from login"
set pass2=pass.execute(sql)
if name=pass2("username") and password=pass2("pwd") and not pass2.eof then
response.redirect "admin.asp"
else
response.write"
用户名或者密码错误!点击返回"
end if
pass.close
set pass=nothing
end if
%>
作者: 默读忧伤 时间: 2004-7-22 01:55 标题: 一个ASP的用户登陆验证表单