TobesC Posted March 20, 2007 Share Posted March 20, 2007 i have the date of the event but i want to be reminded about it two weeks beforehand. how would i go about doing that? thanks a bunch. Link to comment https://forums.phpfreaks.com/topic/43424-reminders/ Share on other sites More sharing options...
Berone Posted March 20, 2007 Share Posted March 20, 2007 #You need to take the timestamp $var = time(); #then add however many seconds you want in two weeks... $var = $var + (60 * 60 * 24 * 14); #60 secs * 60 mintes * 24 hours* 14 days #thenn... do... #$now = time(); if ($now >= $var) { #do reminders } else { #it has not been two weeks since you posted the reminder. } Link to comment https://forums.phpfreaks.com/topic/43424-reminders/#findComment-210899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.