|
<body>
<%
set cn1=Server.CreateObject("ADODB.Connection")
cn1.open "dsn=cxb1"
a1=trim(request("user"))
a2=trim(request("pwd"))
a3=trim(request("pwd1"))
a4=trim(request("mail"))
a5=trim(request("mail1"))
if a2<>a3 then
response.write("<p align=center color=red><a href=login.asp>两次密码不正确,请返回重输</a></p>")
elseif a4<>a5 then
response.write("<p align=center color=red><a href=login.asp>两次输入的邮箱不正解,请返回重输</a></p>")
else
dim name
name=trim(request("user"))
N1=Trim(Request.Form("user"))
session("username")=N1
cn2=" '"&a1&"','"&a2&"','"&a4&"' "
cn1.Execute( "Insert into users(user,pwd,mail) values(" & cn2 &")")
cn1.close
set cn1=nothing
Response.Write "<p align=center color=red>注册成功,感谢你的支持!3秒钟后自动转向bbs.asp</p>"
Response.Write("<script language=javascript>setTimeout("window.location='bbs.asp'",3000)
</script>")
%>
</body>
</html>
不成功的自己参考解决吧 |
|