管理员后台登录时的错误码
自己学着制作管理员后台登录验证程序!但是不知道哪里有错!只会显示当前页是空折的!不管用户名和密码是什么!只有当空的时候才起了作用!请教下是什么问题!<[email=%@LANGUAGE=]%@LANGUAGE="VBSCRIPT[/email]" CODEPAGE="936"%>
<% option explicit %>
<!--#include file="../conn.asp" -->
<%
if request.form("user_name")="" or request.form("user_password")="" then
response.redirect "admin_login.asp"
end if
response.end
dim admin,password,ip,shijian,sql,rs,upsql,ip_data,shijian_data
admin=trim(replace(request.form("user_name"),"'",""))
password=trim(replace(request.form("user_password"),"'",""))
ip=request.servervariables("remote_addr")
shijian=now()
set rs=server.cerateobject("adodb.recordset")
sql="select * from admin where admin='"&admin&"' and password='"&passowrd&"'"
rs.open sql,lele,1,1
ip_data=rs("ip")
shijian_data=rs("shijian")
if rs.bof and rs.eof then
response.write "<script language='javascript'>alert ('乐乐提示:\n\n★请不要攻击小站!谢谢!')</script>"
response.write "<script language='javascript'>history.go(-1)</script>"
response.end
end if
if admin<>rs("admin") or passoword<>rs("password") then
response.write "<script language='javascript'>alert ('乐乐提示:\n\n★用户名和密码没搞错吧!重新试一下!')</script>"
response.write "<script language='javascript'>history.go(-1)</script>"
response.end
end if
upsql="update admin set ip_data=ip set shijian_data=shijian"
lele.execute(upsql)
session("admin")=admin
session("password")=password
response.redirect "admin.asp"
%>