大神帮我看一下这段代码吧, 查找写入数据库的问题!
<!-- #include file="conn.asp" --><%
dim user,pwd,username,tel,msg1,msg2,msg3
user=request.Form("user")
pwd=request.Form("pwd")
username=request.Form("username")
tel=request.Form("tel")
msg1="<script language=JavaScript>alert('用户名或密码不能为空!');javascript:history.go(-1)</script>"
msg2="<script language=JavaScript>alert('注册成功!')</script>"
msg3="<script language=JavaScript>alert('该用户已经被注册!';javascript:history.go(-1))</script>"
if user="" or pwd="" or username="" or tel="" then
response.Write(msg1)
end if
dim rs,sql
set rs=server.CreateObject("ADODB.recordset")
sql="select User from login where user"
rs.open sql,conn,1,1
if rs.recordcount=-1 then
rs.open login,conn,1,3
rs.addnew
rs(User)=user
rs(PWD)=pwd
rs(UserName)=username
rs(TEL)=tel
rs.update
rs.close
set rs=nothing
conn.nothing
response.Write(msg2)
else
response.Write(msg3)
end if
%>