Jump to content

PHP Sleep Function...


markvaughn2006

Recommended Posts

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()); 

 

?>

Link to comment
https://forums.phpfreaks.com/topic/175393-php-sleep-function/
Share on other sites

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.