tjusercheck.asp

来自「在 要要要在在 要要要在在 要要要在在 要要要在在 要要要在在 要要要在在 要要」· ASP 代码 · 共 52 行

ASP
52
字号
<!-- #include file="conn.asp"-->
<!-- #include file="logincheck.asp"-->

<%
sql="select * from user"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="refresh" content="0; url=user.asp">
<title>无标题文档</title>
</head>
<%
password=request.form("password")
Customer=request.form("Customer")
xb=request.form("xb")
xm=request.form("xm")
lx=request.form("lx")
sql="select * from user where Customer='"&Customer&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof then
	Response.write "<script language=javascript>alert('此账号已经存在,请重新注册一个新的账号!');history.go(-1);</script>"
	response.end
end if
if Customer="" then
	Response.write "<script language=javascript>alert('会员账号不能为空!');history.go(-1));</script>"
	response.end
end if
if password="" then
	Response.write "<script language=javascript>alert('会员密码不能为空!');history.go(-1);</script>"
	response.end
end if
if xm="" then
	Response.write "<script language=javascript>alert('真实姓名不能为空!');history.go(-1);</script>"
	response.end
end if
rs.addnew
rs("Customer")=request.form("Customer")
rs("Password")=request.form("password")
rs("xb")=request.form("xb")
rs("xm")=request.form("xm")
rs("lx")=request.form("lx")
rs.update
set rs=nothing

%>
<body>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?