Hello I was wondering how is it possible to delete an add post that a user posts on a website and it would automatically delete after 24 hours? for example like craigslist has their post delete after 7 days.
Thanks.
tangor
12:39 am on Nov 17, 2011 (gmt 0)
Depends on your script(s)... might also do it at server level (chron, etc.) to trigger the action.
Meanwhile, Welcome to Webmasterworld!
thatguy23
1:00 am on Nov 17, 2011 (gmt 0)
but is it possible with php and mysql? or just chronjob?
eelixduppy
1:33 am on Nov 17, 2011 (gmt 0)
Ultimately you need to use a cron job with some sort of script that queries your database and runs a delete on every tuple older than 24 hours. Whether you choose to write this script that the cron executes in php is up to you.
If using a Linux box, type
man crontab
into a terminal.
If using Windows box, see Scheduled Tasks [support.microsoft.com].