Forum Moderators: coopster

Message Too Old, No Replies

Sessions

Timing out the page after 4 minutes of no action

         

bartainer

3:49 pm on Sep 22, 2006 (gmt 0)

10+ Year Member



Hello:

Wow, today I'm full of questions.

I have NEVER used sessions; however. I have a created a delicate form for a client. It's for gift card purchase. I would like the form to clear after the submit button has been hit or clear after 3 minutes of no action. I could use JavaScript; however I'd rather use PHP is possible.

Thank

RonPK

4:27 pm on Sep 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"No action" can only be observed client-side.

rokec

9:28 am on Sep 23, 2006 (gmt 0)

10+ Year Member



If you have mysql database (or just place on a server for a file), you can write last_action in a file or base. When user will click submit it will check diference between last_action and time(). If it is bigger than 240 (4 mins), user won't get a reward (or anything else).

Hope helped you a bit.