First time posting here, I looked for an answer first and could not find one that worked...
I have a code that checks the current time against the recorded time in a database.
$saved = 2015-09-29 11:11:26
$current = 2015-09-29 11:41:00
if (($current - $saved) < 2 minutes) {
// nothing happens
} else {
// set game to complete
}
Obviously my if (()) statement is incorrect, this is what I need help with. Also, I need this script to run every 2 minutes in the background, cron task? No one will every be going to this page checktimes.php.