php timer

Hello Sir,
I want to a timer to be displayed when i clicked on product image and i have succesfully implement that but the timer is getting reset once the user logout but i wanted it to keep running even the user log out .
Plz help me on this.

Really hard to help you, because I don’t have any idea on how your Timer works. Sounds like it’s based off Session and when a user logs out it destroys the session, causing your timer to reset.

When the user logs out couldnt you place the timer point in your database and a logout time, then when they login again calculate the time from last logout to this login, and adjust the time from the logout point.

Not sure what the OP is trying to do, but regarding your post, users don’t always click a logout to log out. Many times they will just close the browser and there begins the problem of trying to do you anything like you mentioned above. You can never trust users to always do what they’re supposed to do.

@Kevin Rubio Brings up a good point, session is always going to time out after a defined period of time that you select.

Sponsor our Newsletter | Privacy Policy | Terms of Service