acess2003 IIS5
<!--#include file="dbpath.asp"-->
<%
user=request.form("user")
pwd1=request.form("pwd1")
pwd2=request.form("pwd2")
email=request.form("email")
web=request.form("web")
url=request.form("url")
gbname=request.form("gbname")
'**********检查是否填写了所有项,如果不是侧自动返回申请页面
if user="" or pwd1="" or pwd2="" or email="" or web="" or url="" or gbname="" then
errmsg=errmsg & "△ 请填写所有内容!\n"
end if
if pwd1<>pwd2 then
errmsg=errmsg & "△ 两次输入的密码不相同!\n"
end if
'**********检查用户名.如果有重复用户名侧自动返回申请页面
dim rsc,errmsg
Set rsc = Conn.Execute("select * from user where user = '" & user & "'")
if not rsc.eof then errmsg=errmsg & "△ 此用户名已被注册,请改名!\n"
if errmsg<>"" then
Conn.Close
Set conn = nothing
Set rsc = nothing
response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
response.end
end if
'**********检查结束**********
set rs=server.createobject("adodb.recordset")
pwd1=md5(pwd1)
'模拟使用MD5加密
sql="select * from user where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("user")=user
rs("pwd")=pwd1
rs("email")=email
rs("web")=web
rs("url")=url
rs("gbname")=gbname
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>