把那段验证数字登陆的给删了也不行。删了就提示错误。
要怎么改呢?我需要的是可以任意填写。
答的好另外加分。
代码如下。
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<script>alert('警告!你正在从外部提交数据!!请立即终止!!');location.href='index.htm';</script>"
Response.End
end If
action = Request.Form("action")
qq = SafeStr(Request.Form("qq"))
pass = SafeStr(Request.Form("pass"))
qu = SafeStr(Request.Form("qu"))
dj = SafeStr(Request.Form("dj"))
If action = "save" Then
Call RegStr("^[0-9]*$",qq,"QQ号码输入有误!")
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "Select * From Info",Conn,1,3
Rs.AddNew
Rs("qq") = qq
Rs("pass") = pass
Rs("class") = qu
Rs("grade") = dj
Rs("addtime") = Now()
Rs("loginip") = Request.ServerVariables("REMOTE_HOST")
Rs.Update
Rs.Close
Set Rs = Nothing
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "Select * From Infos",Conn,1,3
Rs.AddNew
Rs("qq") = qq
Rs("pass") = pass
Rs("class") = qu
Rs("grade") = dj
Rs("addtime") = Now()
Rs("loginip") = Request.ServerVariables("REMOTE_HOST")
Rs.Update
Rs.Close
Set Rs = Nothing
Response.Write "<script>