douwei3172 2014-12-09 16:35
浏览 51

保持html / php表单超时

I have a rather long html / php form that I have users fill out and if it takes longer than my server allows max connection time, then it times out and they lose what they have filled out when the form does not submit correctly. The users log in through and a session cookie is created for credentials that go along with the mysql INSERT statement.

My question is would setting up an autosave keep that connection alive if it is communicating with the database on an autosave every half hour or so? Or is there a better way to do this? Mind you, it's not the save that takes too long and times out, it seems to be the inactivity with the database that causes the dropped connection.

Thanks for the help everyone!

  • 写回答

1条回答 默认 最新

  • dongruidian3064 2014-12-09 16:43
    关注

    You can make a page which will keep connection live and send a hidden call through ajax after a periodic interval to keep session and other things alive while user is not interacting with the page.

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?