Bijumon Attipil
Bijumon Attipil

Reputation: 41

How do you keep track of the session time out in php?

I want to keep track of the session time out from the web page. How do I do it? Let say, a client is on the order product page and for some reason after 10mins without clicking order the product or exit the order page, the time out window pop up. If something like that happened (time out issue), I want to catch it and update the information to our database? How do I do it? thanks

Upvotes: 0

Views: 694

Answers (2)

Oswald
Oswald

Reputation: 31665

Once the session is gone, it's gone and you cannot distinguish it from a request that crafted it's own session identifier. You would have o keep track of used session identifiers yourself by implementing custom session handlers.

Upvotes: 0

Matt Asbury
Matt Asbury

Reputation: 5662

You would need to incorporate javascript into your solution. You would need to start a timer when you hit a page and then, when the timer hit a certain number of seconds, update the database via ajax and then create the pop up notification.

Upvotes: 1

Related Questions