rathish Posted October 6, 2010 Share Posted October 6, 2010 Hi, I am implementing a forum in php and mysql. I want to close forum questions / posts automatically after four days of posting. How to implement this ? Please help me. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/215279-forum-implementaton/ Share on other sites More sharing options...
phpchamps Posted October 6, 2010 Share Posted October 6, 2010 set up a cronjob for that which will run daily..... find all the question which were posted 4 days ago.. change the status or delete the questions. Link to comment https://forums.phpfreaks.com/topic/215279-forum-implementaton/#findComment-1119524 Share on other sites More sharing options...
rathish Posted October 6, 2010 Author Share Posted October 6, 2010 Hai, Thank you for reply. But I want it more precise. For example, if one person posts on today 11:30 am , then the question should be closed on 11:30 am , four days after. Not only the day matters but also the time. Link to comment https://forums.phpfreaks.com/topic/215279-forum-implementaton/#findComment-1119529 Share on other sites More sharing options...
BlueSkyIS Posted October 6, 2010 Share Posted October 6, 2010 if you need to update to the minute, run a cron job every minute updating posts that are exactly 4 days old. Link to comment https://forums.phpfreaks.com/topic/215279-forum-implementaton/#findComment-1119608 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.