📄 regpro.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册处理</title>
</head>
<body>
<%
rlname=request.Form("rlname")
usrname=request.form("usrname")
passwd=request.Form("passwd")
dim errs
if len(rlname)=0 or len(rlname)>8 then
response.Write("请正确输入你的真实姓名!")
errs=true
elseif len(usrname)<4 or len(usrname) >12 then
response.Write("用户名只能在4到12个字符之间!")
errs=true
elseif len(passwd)<5 then
response.Write("密码至少要有5个字母!")
errs=true
end if
if errs then response.Write("<br/><a href='javascript:history.back(-1)'>点此返回上一页</a>"):response.End()
sql="select * from tbl_user where username='" & usrname & "'"
Dim RS
Set RS=Server.CreateObject("ADODB.RecordSet")
RS.Open sql,conn,1,3
if not(rs.eof or rs.bof) then
response.Write("用户名已存在,请<a href='javascript:history.back(-1)'>返回</a>更换用户名重新注册!")
rs.Close
set rs=nothing
conn.Close
set conn=nothing
else
rs.Addnew
RS("rlname")=rlname
RS("username")=usrname
RS("passwd")=passwd
Rs("usertype")=0
RS.update
RS.Close
set rs=nothing
conn.Close
set conn=nothing
response.Write("成功注册,请等待管理员批准。<br><a href=../>点此返回主页</a>")
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -