📄 regsave.asp
字号:
<!--#include file=conn.asp-->
<%
dim errmsg,user_name,user_pass,user_pass2,user_mail,user_add,user_tel,founderr
if trim(request("name"))="" then
errmsg=errmsg+"<br>"+"<li>用户名不能为空"
founderr=true
else
user_name=trim(request("name"))
end if
if trim(request("password"))="" or trim(request("enpassword"))="" then
errmsg=errmsg+"<br>"+"<li>密码或确认不能为空"
founderr=true
else
user_pass=trim(request("password"))
user_pass2=trim(request("enpassword"))
end if
if user_pass <> user_pass2 then
errmsg=errmsg+"<br>"+"<li>两次密码不同"
founderr=true
end if
user_mail=trim(request("email"))
user_add=trim(request("address"))
user_tel=trim(request("tel"))
set rs=server.createobject("adodb.recordset")
sql="select * from ps where Name='"&user_name&"'"
rs.open sql,conn,3,3
while Not rs.eof
errmsg=errmsg+"<br>"+"<li>此用户以被人注册"
founderr=true
wend
rs.close
if founderr=false then
sql="select * from ps where Name='"&user_name&"'"
rs.open sql,conn,3,3
rs.addnew
rs("Name")=user_name
rs("Password")=user_pass
rs("EnPassword")=user_pass2
rs("E-mail")=user_mail
rs("Address")=user_add
rs("Tel")=user_tel
rs.update
rs.close
set rs=nothing
response.write "<a href=index1.asp>返回</a>"
else
response.write errmsg
response.write "<br><a href=reg.asp>返回</a>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -