datetime - PHP Delete Record after 7 Days? -


i want delete records database when 7 days or older. have server time set uk time reason code wrote below echo's account deleted 7 or more days old , reason it's not working. before test on test database decided use simple echo now, won't work.

anyone have suggestions why it's not working? must doing wrong.

<?php  // current time $current_time = time();  /* time used below (unix) testing  18-02-2011 14:34:24 (yesterdays date/time) */ $account_delete = strtotime(time('1298039664'));  if ($current_time - $account_delete >= (7*24*60*60)){ echo 'account deleted 7 or more days old'; } else {   echo 'account not deleted less 7 days old'; }  ?> 

replace strtotime(time('1298039664')) 1298039664?

time() not take parameters.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -