<%
if request.Form<>"" then
UserName =Request.Form("UserName"
password=request.Form("password"
Email =Request.Form("Email"
HomePage =Trim(Request.Form("HomePage"
)
qq=request.Form("QQ"
sex =Request.Form("sex"
Face =Request.Form("Face"
if homepage="http://" then homepage=""
Set rs=server.createobject("ADODB.RECORDSET"
rs.open "Select * From register where username="& request("username"
,Conn,3,3
if rs.eof then
sql="Insert Into register (username,password1,mail,homepage,face,sex,qq) values('"& UserName&"','"& md5(password)&"','"&email&"','"&homepage&"','"&face&"','"&sex&"','"&qq&"')"
conn.Execute sql
cookiePath=request.servervariables("path_info"
cookiePath=left(cookiePath,instrRev(cookiePath,"/"
)
response.cookies("ly"
.Path=cookiePath
response.cookies("ly"
("useridname"
=username
response.cookies("ly"
("useridpassword"
=password
else
response.Redirect "error.asp?type=usrname"
end if
response.Redirect "post_ok.asp?info=注册成功!"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
%>
一个注册用户的程序,不论怎么注册都报“ rs.open "Select * From register where username="& request("username"
,Conn,3,3”这行有问题!
不知道知道怎么解决,请帮帮忙吧!