欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

asp access用户注册实例

程序员文章站 2024-02-15 13:26:40
...

本文章提供一款关于asp access 用户 注册 实例 哦,页面只提供部份参考代码,我们提供这款 实例 完整源码下载,如果你喜欢可以免费下载本款源码哦。 本文章提供一款关于 asp教程 access 用户 注册 实例 哦,页面只提供部份参考代码,我们提供这款 实例 完整

本文章提供一款关于asp access用户注册实例哦,页面只提供部份参考代码,我们提供这款实例完整源码下载,如果你喜欢可以免费下载本款源码哦。

本文章提供一款关于asp教程 access用户注册实例哦,页面只提供部份参考代码,我们提供这款实例完整源码下载,如果你喜欢可以免费下载本款源码哦。




sub save()
dim username,userpwd,pwd,name,email
'读取从表单传递过来的用户名数据,trim函数去掉字符串的前导与后续空格
username=trim(request.form("username"))
userpwd=trim(request.form("userpwd"))
pwd=trim(request.form("pwd"))
name=trim(request.form("name"))
email=trim(request.form("email"))
'用户输入不完全
if username="" or userpwd="" or pwd="" or name="" or email="" then
'给出提示,返回注册页面。history.back()表示返回注册页面
response.write ""
response.end
end if
if userpwdpwd then '两次输入的密码不相同
'给出提示,并返回注册页面
response.write ""
response.end
end if
'isvalidemail过程判断用户输入的邮件地址格式是否正确
if not isvalidemail(email) then
'邮件地址格式错误,则给出提示,并返回到注册页面
response.write ""
response.end
end if
'判断数据库教程中是否存在用户输入的用户
set hvrs=server.createobject("adodb.recordset")
'从数据库中查找username列的值为username的记录
sql="select * from user where username='" & username & "'"
hvrs.open sql,conn,1,1
if not (hvrs.eof and hvrs.bof) then '存在满足条件的记录
'用户名在数据库中存在,则给出提示,并返回注册页面
response.write ""
response.end
else '不存在满足条件的记录
'在数据库中插入一条新记录
set rs=server.createobject("adodb.recordset")
sql="select username,password,name,email from user"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username '用户登录名
rs("password")=md5(userpwd) '用户登录密码
rs("name")=name '用户真实姓名
rs("email")=email '用户电子邮箱
rs.update '更新数据库
rs.close
end if
hvrs.close
set hvrs=nothing
end sub
%>



聊天室


聊天室注册向导





if request.querystring("result")="successful" then
call save()
call show()
else
call main()
end if
%>

































基本信息设置





用 户 帐 号:




*
请输入您需要注册用户


用 户 密 码:





*
用于登陆系统的身份验证




密 码 确 认:




*
确认密码


真 实 姓 名:




*
请输入真实姓名


电 子 邮 箱:



*请输入您的电子邮箱


















用户注册成功




您的信息设置已经成功,进入聊天室请点击“完成”


[ 完成 ]





set rs=nothing
conn.close
set conn=nothing
%>

下载本款实例源码

http://down.111cn.net/down/code/asp/2010/1024/21402.html