为什么不能成功的把注册信息插入到数据库中。
<!--#include file="conn.asp"-->
<%
dim name,pwd,email,sex
name=request.form("name")
pwd=request.form("pwd")
email=request.form("email")
sex=request.form("sex")
if request.Form("name")="" then
response.Write"<script language=javascript>alert('请输入用户名');history.back(-1);</script>"
response.End()
end if
if request.Form("pwd")="" then
response.Write"<script language=javascript>alert('请输入密码');history.back(-1);</script>"
response.End()
end if
if request.Form("email")="" then
response.Write"<script language=javascript>alert('请输入Email地址');history.back(-1);</script>"
response.End()
end if
if request.Form("sex")="" then
response.Write"<script language=javascript>alert('请输入性别');history.back(-1);</script>"
response.End()
end if
name=trim(request.Form("name"))
pwd=trim(request.Form("pwd"))
email=trim(request.Form("email"))
sex=trim(request.Form("sex"))
set rs=server.CreateObject("adodb.recordset")
rs.open"select * from denglu where name like '%"& name &"%'",conn,1,3
if rs.recordcount>0 then
response.Write("<p align=""center"">")
response.Write("该帐号已经注册!")
response.Write("<br>")
response.Write("</p>")
else
rs.addnew
rs.fields("name")=name
rs.fields("pwd")=pwd
rs.fields("sex")=sex
rs.fields("email")=email&" "
response.Write("注册成功,您的资料如下!")
response.Write("<br>")
response.Write "你的帐号是:" & name
response.Write("<br>")
response.Write "你的密码是:" & pwd
response.Write("<br>")
response.Write "性别:" & sex
response.Write("<br>")
response.Write "电子邮件:" & email
end if
%>
[求助]用户注册