<%
dim nick,password,repass,name,email
dim province,city,address,zip,phon,message,str,conn,dbpath,sql
nick=trim(request.Form("nick"))
password=trim(request.Form("password"))
repass=trim(request.Form("repass"))
name=trim(request.Form("name"))
email=trim(request.Form("email"))
province=trim(request.Form("province"))
city=trim(request.Form("city"))
address=trim(request.Form("address"))
zip=trim(request.Form("zip"))
phon=trim(request.Form("phon"))
if nick="" or password=""or repass=""then
response.Write("有项目没填完")
end if
if password <> repass then
response.Write("两次输入密码不符")
end if
dbpath=server.mappath("connection/db1.mdb")
set conn=server.createobject("adodb.connection")
conn.open "PROVIDER=Microsoft.jet.OLEDB.4.0;data source="&dbpath
set rs=server.createobject("adodb.connection")
sql="select * from users where nick='"&nick&"'"
rs.open sql,conn,0,1
if rs.eofandrs.bof then
sql="insert into Users (Nick,Password,Name,Email,Province,City,Address,Zip,Phon)Values('"&Nick&"','"&Password&"','"&Name&"','"&Email&"','"&Province&"','"&City&"','"&Address&"','"&Zip&"','"&Phon&"')"
Conn.execute sql
rs.close
response.Write("<center>祝贺你注册成功,按<a href=products.asp>这里</a>开始购物</center>")
else
rs.close
set rs=Nothing
set conn=nothing
ShowMessage "此登录名已被注册!"
end if
end if
%>
<%sub show(msg)%>
<center>
<h4><%=msg%>
</h4></center>
<form>
<p align="center">
<input type=button value="返回重新填写"onclick="history.back();" />
</p>
</form>
<%
end sub
%>
问题如下
Microsoft VBScript 编译器错误 错误 '800a0400'
缺少语句
/登陆和注册/checkregi.asp,行 37
end if
请大家帮忙看看 感谢了
[此贴子已经被作者于2007-10-22 22:59:21编辑过]