devildog10920 Posted April 4, 2006 Share Posted April 4, 2006 Make a expricy script for a database.... like i want to make a "detention" script and want the "detention" to expire after a certain amount of hours..... How could I do this. Link to comment https://forums.phpfreaks.com/topic/6528-how-do-i/ Share on other sites More sharing options...
$cripts Posted April 4, 2006 Share Posted April 4, 2006 cron job Link to comment https://forums.phpfreaks.com/topic/6528-how-do-i/#findComment-23678 Share on other sites More sharing options...
devildog10920 Posted April 4, 2006 Author Share Posted April 4, 2006 [!--quoteo(post=361420:date=Apr 3 2006, 08:50 PM:name=$cripts)--][div class=\'quotetop\']QUOTE($cripts @ Apr 3 2006, 08:50 PM) [snapback]361420[/snapback][/div][div class=\'quotemain\'][!--quotec--]cron job[/quote]Im not very familier with that. Link to comment https://forums.phpfreaks.com/topic/6528-how-do-i/#findComment-23679 Share on other sites More sharing options...
khendar Posted April 4, 2006 Share Posted April 4, 2006 It means setting up a scheduled task on the server which executes a php script which will do the expiry. Only really useful if your server is running Linux and you have access to the server to do this.The other way is to have a "time_to_expire" field in a database. And each time the webpage is loaded, it checks to see if the time_to_expire is less than the current time. If it is then set a flag in the databse which indicates that it has expired. Link to comment https://forums.phpfreaks.com/topic/6528-how-do-i/#findComment-23681 Share on other sites More sharing options...
redarrow Posted April 4, 2006 Share Posted April 4, 2006 [!--quoteo(post=361421:date=Apr 4 2006, 12:51 AM:name=PHPDesigner)--][div class=\'quotetop\']QUOTE(PHPDesigner @ Apr 4 2006, 12:51 AM) [snapback]361421[/snapback][/div][div class=\'quotemain\'][!--quotec--]Im not very familier with that.[/quote]I thort i throw this in ok.[code]$dosomethinkday = '01'; // day of month $today = date("M d, Y"); $doit = date("M $dosomethinkday, Y"); if ($doit == $today) {IF 2 DATES MATCH LET'S DO SOMETHINk}[/code]It will also use the time() format to do somethink ok. Link to comment https://forums.phpfreaks.com/topic/6528-how-do-i/#findComment-23686 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.