<!--#include file="c.asp"-->
<%
Sub PreventRefresh()
Dim RefreshTime,isRefresh
RefreshTime = 10 '防止刷新时间,单位(秒)
isRefresh = 1 '是否使用防刷新功能,0=否,1=是
If isRefresh = 1 Then
If (Not IsEmpty(Session("RefreshTime"))) And RefreshTime > 0 Then
If DateDiff("s", Session("RefreshTime"), Now()) < RefreshTime Then
Response.Write "<META http-equiv=Content-Type content=text/html; chaRset=gb2312><meta HTTP-EQUIV=REFRESH CONTENT="&RefreshTime&"><br>本页面起用了防刷新机制,请不要在"&RefreshTime&"秒内连续刷新本页面<BR>正在打开页面,请稍后……"
Response.End
Else
Session("RefreshTime") = Now()
End If
Else Session("RefreshTime") = Now()
End If
End If
End Sub
PreventRefresh
gameid=REQUEST("gameid")
ask=REQUEST("ask")
if gameid="" then
'response.write("gameid=null")
response.end
end if
if ask="" then
'response.write("ask=null")
response.end
end if
sql="INSERT INTO leave_msg(gameid,ask,tm) Values(" &gameid& ",'" &ask& "' , now())"
conn.Execute(sql)
response.write sql
conn.Close
%>
asp 写提交表单到数据库
最新推荐文章于 2021-06-10 03:28:25 发布