lional Posted September 5, 2009 Share Posted September 5, 2009 Hi all I have a page where a client fills out bthis for but I do not want them to fill out the form less that three months apart. When they fill out the form I update the client table with the date that the form was filled out. What I want to do is to run a script that would take todays date and then check if the date when they filled in the form is greater than 3 months and if so list their email address. I just need help with the date comparison Any help will be appreciated Link to comment https://forums.phpfreaks.com/topic/173204-solved-checking-dates/ Share on other sites More sharing options...
unknown1 Posted September 5, 2009 Share Posted September 5, 2009 This will take todays date and add 90 days $today=date('m/d/y'); $theFuture=date('Y-m-d',strtotime($today.' + 90 days')); echo $theFuture; Link to comment https://forums.phpfreaks.com/topic/173204-solved-checking-dates/#findComment-913018 Share on other sites More sharing options...
Daniel0 Posted September 5, 2009 Share Posted September 5, 2009 If you just want today +90 days you can just do strtotime('+90 days'). No need for a date to add it to. Link to comment https://forums.phpfreaks.com/topic/173204-solved-checking-dates/#findComment-913026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.