但是如何让他在接受 jieshou.asp?dlid=123 123这个用户ID的同时 检查数据库内是否存在这个 ID呢?
怎么出现错误
Microsoft VBScript 编译器错误 (0x800A03EA)
语法错误
大家帮忙检查下错误~!谢谢了
<%
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from [User] where ID=" & session("ID")
rs.open sql,conn,1,3 if rs.recordcount>0 then
response.write("该用户存在")
else
response.write("该用户不存在")
end if
%>
<%
dlid=request.querystring("dlid") '接收参数
if Request("action")="action" then
if Trim(Request.Form("User"))="" or Trim(Request.Form("UserPass"))="" or Trim(Request.Form("Email"))="" or Trim(Request.Form("QQ"))="" or Trim(Request.Form("tel"))="" or Trim(Request.Form("name"))="" then response.redirect "error.asp?id=004"
if len(Trim(Request.Form("UserId")))<3 or len(Trim(Request.Form("tel")))<7 then response.redirect "error.asp?id=004"
if isValidstring(Trim(Request.form("UserId")))<>"" then Response.Redirect ("error.asp?id=022")
if IsValidEmail(Trim(Request.form("Email")))=false then Response.Redirect ("error.asp?id=015")
if isInteger(Trim(Request.Form("UserId"))) then response.redirect "error.asp?id=008"
sql="select * from [User] where UserId='" & Trim(Request.Form("UserId")) & "'"
set rs=conn.Execute(Sql)
if rs.bof and rs.eof then
else
Response.Redirect("error.asp?id=008")
end if
sql="select * from [Agent_User] where email='" &Trim(Request.Form("email"))&"'"
set rs=conn.Execute(Sql)
if rs.bof and rs.eof then
else
Response.Redirect("error.asp?id=014")
end if
rs.close
if EncryptPass=1 then
Set Autohost = Server.CreateObject("autohost.Createhost")
passwd=autohost.md5(Trim(Request.Form("UserPass")))
Set Autohost=nothing
else
passwd=Trim(Request.Form("UserPass"))
end if
sql="select * from [Agent_User] where (ID is null)"
sql="insert into [Agent_User] (userid,passwd,email,qq,TelePhone,name,grade,Createdate,other,daili) values('"&Trim(Request.Form("UserId"))&"','"&passwd&"','"&trim(Request.Form("email"))&"','"&trim(Request.Form("QQ"))&"','"&Trim(Request.Form("tel"))&"','"&Trim(Request.Form("name"))&"','1','"&date&"','"&trim(Request.Form("Other"))&"','"&trim(Request.Form("daili"))&"')"
conn.Execute(Sql)
set rs=nothing
set conn=nothing
%>