28,409
社区成员




<!--#include file="conn.asp"-->
<html>
<head>
<title>验证 </title>
</head>
<body>
<%
userID=Trim(request("ID"))
userPassword=Trim(request("password"))
E-mail=Trim(request("e-mail"))
If(userID=""or userPassword=""or E-mail="")Then
response.write"用户名或密码或邮箱不能为空"
response.End
end if
Dim strsql,rs
strsql="select * from user where username='"&userID&"'"
strsql= strsql & " and password='"&userPassword&"'"
strsql=strsql & " and email='"&E-mail&"'"
set conn=server.CreateObject("adodb.connection")
conn.open "mydata"
set rs = CreateObject("ADODB.RecordSet")
rs.Open strsql, conn, 1, 3
if not (rs.eof And rs.Bof) then
response.Write("用户名已经存在")
response.End
else
rs.AddNew
rs("username")=userID
rs("password")=userPassword
rs("email")=E-mail
rs.update
response.Write("用户添加成功!")
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</body>
</html>