Jump to content

PHP/MySQL Time Questions.


lill87

Recommended Posts

Hello, im making an web-based game and im trying to make a code that makes a user to log out automatically if the user is inactive for 30 minutes, but im totally stuck on doing it.

 

And im also trying to make a countdown script.

Example: The user is buying an item, the delivery of the item takes 2 minutes. 2 minutes later the user have the item.

How do i make that in the MySQL table, and continue ticking even if the user is not logged in?

 

 

Can someone post an example to my questions, or give a link to websites with similar tutorials or examples.

Thanks // lill87

Link to comment
Share on other sites

first off the timeout script, just set your session life to 30 minuites, and on every reload refresh the session.  As for the items, why put a delay in it, just do the proper queries to make the item and then your done, why must u have a delay.  If you are making like a shop that restocks then yes a delay makes sense and cron is a good choice, but otherwise no.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.