Hello guys! I'm currently working on a script that should empty a field in a database every 24h. list($hour, $minute, $second) = explode(":", date("H:i:s", time())); $empty = ""; if( (intval($hour) == 0) && (intval($minute) == 0) && (intval($second) == 0) ){ mysql_query("UPDATE `contest` SET 24h_ips='".$empty."' "); } PHP: The problem is that I thought it will execute even if no one accesses the page (@ 00:00:00), but it seems that I was wrong.... In order to execute someone has to access the page in that precise moment.... Is there some way to make it execute even if no one accesses the page at that time? Thanks a lot, Vlad
Yes its called a 'cron job'. Search either google or these forums for that prhase. Essentially, it will execute the script you posted above at a precise time.