markvaughn2006 Posted September 24, 2009 Share Posted September 24, 2009 Can you do the following with the sleep function?? And it "sleeps" for 5 minutes, what happens if they go to another page before the 5 minutes? will it still do the UPDATE? Thanks guys!! <?php echo "You were attacked and lost!" //sleep for 5 minutes sleep(300); $result = mysql_query("UPDATE example SET injured='0' WHERE injured='1'") or die(mysql_error()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/175393-php-sleep-function/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 24, 2009 Share Posted September 24, 2009 http://www.php.net/manual/en/function.ignore-user-abort.php And you would need to actually test it on your server to make sure it works as expected. Quote Link to comment https://forums.phpfreaks.com/topic/175393-php-sleep-function/#findComment-924247 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.