% UserID1=Trim(Request.Form("UserID")) UserName1=Trim(Request.Form("UserName")) Psw=Trim(Request.Form("Psw")) Email=Trim(Request.Form("Email")) Webname=Trim(Request.Form("webname")) weburl=Trim(Request.Form("weburl")) dim CheckID,CheckEmail,CheckCode,isSucess CheckID=0 CheckEmail=0 if UserID1<>"" then '检测用户名 set rs=conn.execute("select count(*) as CheckID from myuser where UserID='"&UserID1&"'") CheckID=rs("CheckID") rs.close '检测用户Email set rs=conn.execute("select count(*) as CheckEmail from myuser where Email='"&Email&"'") CheckEmail=rs("CheckEmail") rs.close '检查验证码 if Trim(Session("1zhai"))=Trim(Request.Form("ValidateCode")) then CheckCode=0 else CheckCode=1 end if if CheckID=0 and CheckEmail=0 and CheckCode=0 then set rsadd=server.createobject("ADODB.recordset") Application.Lock() rsadd.Open "myuser",conn,3,3 rsadd.AddNew rsadd("UserID")=UserID1 rsadd("UserName")=UserName1 rsadd("Psw")=Psw rsadd("Email")=Email rsadd("webname")=webname rsadd("weburl")=weburl rsadd("RegTime")=now rsadd("LogonTime")=now rsadd.Update rsadd.close Application.UnLock() Response.Cookies("ppflyzID")=UserID1 Response.Cookies("ppflyzID").Expires=Date+30 isSucess="Yes" UserID=UserID1 end if end if %>
| 新用户注册 |