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
https://forums.phpfreaks.com/topic/70515-phpmysql-time-questions/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.