
程序代码:
uname=request("username")
set rs=server.createobject("ADODB.Recordset")
SQL="select * from userlist where [userid]='"&uname&"'"
rs.open SQL,conn,1,3
if not rs.eof then
Response.Write"<span style='font-size:12px;' align='center'>用户名:"&uname&"已存在。请选择其他用户名! <a href='javascript:history.go(-1)' class=red>返回</a></font>"
Response.End()
else
rs.addnew
rs("username")=uname '楼上好像说得有道理
rs("chkvip")=request("chkvip")
rs("userid")=uname
rs("password")=md5(request("password1"))
rs("tel")=request("tel")
rs("email")=request("email")
rs("handset")=request("handset")
rs("address")=request("address")
rs("weburl")=request("weburl")
rs("sign")=request("sign")
rs("question")=request("question")
rs("answer")=request("answer")
rs("tatty")=5
rs("addtime")=now()
rs("starttime")=date()
rs("hide")=1
rs("endtime")=date()+365
rs.update
rs.close
set rs=nothing
Response.Write "注册成功"
end if