tgavin Posted June 22, 2007 Share Posted June 22, 2007 I've been looking all over the place for a compare dates script that will work in my instance. I can't find one. This shouldn't be difficult, unless you're like me and get nose bleeds when trying to do anything related to numbers. I'm having a hell of a time wrapping my head around strtotime() and the epoch. Plus, I can't see straight right now Here's what I want to do. 1. user joins. 2. thank you email is sent 3. if account is not activated within 3 days, send a reminder email // i think it's like this $today $date_joined $cutoff_date = ($today + 30 days) if($date_joined >= ($cutoff_date - 3 days)) { //do something } 1. user joins 2. user has 30 days to try account 3. 3 days before account is to be deleted, reminder email is sent // again, I'm "thinking" $date_joined $reminder_date = ($today + 3 days) if($date_joined >= $reminder_date) { do something } Thanks in advance for your understanding and help Link to comment https://forums.phpfreaks.com/topic/56654-solved-the-old-compare-dates-thing/ Share on other sites More sharing options...
cooldude832 Posted June 22, 2007 Share Posted June 22, 2007 first you going to need to check if your serve can do a cron job or equivilant then you will secondly need to setup a query that says and then use a makedate function for $day3 $day3 = mktime(0,0,0,date("m"),date("d")-3,date("Y")); SELECT $fields FROM $table WHERE cdate = $day3 then say while ($row=query results) //send email do the same for 27 days saying d-27, but you really need cron job for it to work otherwise you need to manually run said script daily Link to comment https://forums.phpfreaks.com/topic/56654-solved-the-old-compare-dates-thing/#findComment-279780 Share on other sites More sharing options...
tgavin Posted June 22, 2007 Author Share Posted June 22, 2007 thanks dude Link to comment https://forums.phpfreaks.com/topic/56654-solved-the-old-compare-dates-thing/#findComment-280106 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.