Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
- php-forum Super User
- Posts: 1805
- Joined: Thu Mar 10, 2011 5:07 pm
something like this:
Code: Select all
// do necessary validations
// todays date should be in the same format as that of application date
$diff_in_secs = strtotime($todays_date) - strtotime($app_date);
$diff_in_days = floor($diff_in_secs/3600/24);
if ($diff_in_days > 30)
Usually this function is placed in the Library of CI. A controller call is then placed to this function and if the function returns TRUE then appropriate view is loaded to flash the message.
Who is online
Users browsing this forum: Mithunkumar and 4 guests