关于用COOKIES记录限制进入次数

sky_wei 2006-01-16 06:21:19
我现在用的是cookies两小时过时一次
请问各位大哥,怎么用标准时候来限制
当有一个大厅这个时段时在用,就不能再用了
提示更换其它大厅.怎么用循环语句写
gaobt=Trim(Request.Form("gaobt"))
gaobtime=Trim(Request.Form("gaobtime"))
set mess=server.CreateObject("Adodb.RecordSet")
sql="select * from [right] where pzh='"&pzh&"'"
mess.open sql,conn,1,3
if mess.bof or mess.eof then
mess.addnew
mess("gaobt")=gaobt
mess("gaobtime")=gaobtime
mess.update
response.cookies("gaobt")=mess("gaobt")
response.cookies("gaobtime")=mess("gaobtime")
response.cookies("gaobt").expires=Hour+2
response.cookies("gaobtime").expires=Hour+2
end if
if mess("gaobt")=gaobt then
response.write"<script>alert('此大厅已在使用,请更换其它大厅');history.back()</script>"
else
response.write"<script>alert('添加成功');</script>"
response.write"<script>window.location.href='right.asp';</script>"
end if
...全文
65 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
forlovebin 2006-01-17
  • 打赏
  • 举报
回复
帮顶一下

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧