我快疯了,我的代码什么地方有问题?
我有newusercheck.asp用户注册和 newuseradd.asp检查填写是否正确,正确就把用户信息写入数据库。
newusercheck.asp
-------------------------------------------------------------------------
<P class="FONT"><font
size=2>为了我们更好的为您服务,更准确及时的将您订购的商品送到您的手中和与您联系,请您务必详细填写您的信息,并核对无误;
国内用户请留下您的真实中文姓名。<BR>请放心:您的资料未经您的允许,我们将只用于处理您的订货信息,对外保密。 <FONT
face=Arial>(</FONT>带</font><FONT color=#ff0000><STRONG>
*</STRONG></FONT>
<font size=2>号为必填项<FONT face=Arial>)</FONT></font></P>
<p><TABLE border=1 cellPadding=1 cellSpacing=1 width="318" align="center">
<TR>
<TD class="FONT" width="40%"><font
face="Small Fonts"><font size=2>昵称<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></font></TD>
<TD width="228"><input type="text" name="nicename" size="20" ID=Text6>
</TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>姓名<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></TD>
<TD width="228"><input type="text" name="name" size="20" ID=Text1>
</TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>联系电话<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></TD>
<TD width="228"><input type="text" name="tel" size="20" ID=Text2></TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>联系地址<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></TD>
<TD width="228"><input type="text" name="addr" size="20" ID=Text3></TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>E_mail:<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></TD>
<TD width="228"><input type="text" name="email" size="20" ID=Text4></TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>邮编:</font><FONT color=#ff0000><STRONG><font
size=2>*</font>
</STRONG></FONT></TD>
<TD width="228"><input type="text" name="zip" size="20" ID=Text5></TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>密码:<FONT color=#ff0000><STRONG>*
</STRONG></FONT></font></TD>
<TD width="228"><input type="password" name="password1" size="20" ID=Password1></TD></TR>
<TR>
<TD class="FONT" width="74"><font size=2>确认密码<FONT color=#ff0000><STRONG>
*</STRONG></FONT></font></TD>
<TD width="228"><input type="password" name="password2" size="20" ID=Password2></TD></TR></TABLE> </p>
-------------------------------------------------------------------------
newuseradd.asp
-------------------------------------------------------------------------
<%@ Language=VBScript %>
<%option explicit
connstr="dbq=" & server.MapPath("mobile.mdb") & ";driver={microsoft access driver (*.mdb)};"
set conn=server.CreateObject("adodb.connection")
conn.Open connstr
set rs=server.CreateObject("adodb.recordset")
dim nicename,name,tel,addr,email,zip,pw1,pw2,temp
dim founderr,errmsg
founderr=false
name=Request.Form("name")
if name="" then
founderr=true
errmsg="姓名不能为空"
end if
tel=Request.Form("tel")
if tel="" then
founderr=true
errmsg=errmsg & "联系电话不能为空"
end if
addr=Request.Form("addr")
if addr="" then
founderr=true
errmsg=errmsg & "联系地址不能为空"
end if
email=Request.Form("email")
if email="" then
founderr=true
errmsg=errmsg & "e-mail不能为空!"
end if
zip=Request.Form("zip")
if zip="" then
founderr=true
errmsg=errmsg & "邮编不能为空!"
end if
pw1=Request.Form("password1")
pw2=Request.Form("password2")
if (pw1="" or pw1<>pw2) then
founderr=true
errmsg=errmsg & "密码错误!"
end if
nicename=request.form("nicename")
if nicename="" then
founderr=true
errmsg="非法的用户名!"
end if
sql="select * from user where nicename='" & nicename & "'"
rs.Open sql,conn,1,1
if rs.RecordCount>0 then
founderr=true
errmsg="此用户名已注册!"
end if
if founderr then
Response.Write errmsg
%>
(略)
<%else
添加记录(略)
<% end if%>
-------------------------------------------------------------------------
我在注册页面填了详细的信息,然后点确定,结果返回“E-mail不能为空”的信息。但是我email可是填了啊!我看了半天觉得代码好象没有什么问题。 你们看看,是不是我什么地方疏忽了。