登录注册模块代码Word格式文档下载.doc
《登录注册模块代码Word格式文档下载.doc》由会员分享,可在线阅读,更多相关《登录注册模块代码Word格式文档下载.doc(11页珍藏版)》请在冰豆网上搜索。
if
err
then
err.clear
conn
=
nothing
response.write
数据库连接出错,请检查conn.asp中的连接字符串。
response.end
end
if
function
closedb
conn.close
conn=nothing
function
%>
%
dim
badword
badword="
|and|select|update|chr|delete|%20from|;
|insert|mid|master.|set|chr(37)|="
request.querystring<
>
chk=split(badword,"
|"
for
each
query_name
in
request.querystring
i=0
to
ubound(chk)
instr(lcase(request.querystring(query_name)),chk(i))<
0
script
language=javascript>
alert('
传参错误!
参数
query_name&
的值中包含非法字符串!
\n\n'
);
location='
request.servervariables("
http_referer"
)&
/script>
reg.asp
!
--#i
nclude
file="
conn.asp"
-->
request("
action"
)="
reg"
rs=server.createobject("
adodb.recordset"
rs.open
select
*
from
user
where
name='
trim(request("
name"
))&
conn,1,1
rs.recordcount>
language='
javascript'
window.alert('
您输入的用户名已存在,请返回重新输入!
history.back(-1);
response.end()
sql="
user"
sql,conn,1,3
rs.addnew
rs("
)=trim(request.form("
))
pwd"
))
wenti"
daan"
rs.update
rs.close
rs=nothing
注册成功,点击确定立即登录!
location.replace('
login.asp'
html>
head>
meta
http-equiv="
content-type"
content="
text/html;
charset=gb2312"
title>
无标题文档<
/title>
/head>
body>
top.asp"
table
width="
90%"
border="
1"
align="
center"
cellpadding="
10"
cellspacing="
0"
tr>
td>
用户注册
form
name="
form1"
method="
post"
action="
?
action=reg"
onsubmit="
return
chkform(this)"
347"
5"
td
142"
用户名<
/td>
179"
input
type="
text"
id="
/tr>
密码<
password"
密码提示问题<
密码提示答案<
colspan="
2"
submit"
value="
注册"
reset"
重置"
/table>
/form>
/body>
/html>
top.asp
a
href="
/webjx/"
;
index.asp"
首页<
/a>
session("
reg.asp"
注册<
login.asp"
登陆<
pwd.asp"
忘记密码?
else
欢迎您<
%=session("
)%>
,
loginout.asp"
注销登陆<
jiami.asp"
加密页<
br>
login.asp
用户登陆
loginok.asp?
action=login"
116"
登陆"
303"
,您已经成功登陆<
loginok.asp
session.timeout=30
login"
name=trim(request.form("
pwd=trim(request.form("
or
pwd="
response.redirect
("
name&
and
pwd='
pwd&
sql,conn,1,1
not
rs.eof
)=name
response.redirect"
edit.asp"
else
error.asp"
loginout.asp
退出登陆成功!
location.href('
index.asp'
pwd.asp
bo