$startDate = "20150624";
$endDate = "20150722";
$startDate = strtotime($startDate);
$endDate = strtotime($endDate);
$dayLength = 60 * 60 * 24;
$checkDateRange = ($endDate - $startDate) / $dayLength;
$datesStartMonth = date('t', $startDate);
if ($checkDateRange > $datesStartMonth) {
echo $error = "Date range should be with in one month";
}
Related Articles
How to Create Ical File to Work on Outlook, Google Calendar and Mac Icalendar
To Create Ical files we need to follow some standards set by ietf.org. Below are the working copies of the sample ical files created and these are tested on Outlook calendar, Google Calendar, Mac Icalendar, and Thunder Bird Calendar with Lightning plugin. How to Create Ical File Contents show 1. How to Create Ical File […]
Email Verification Confirmation Using PHP Codeigniter
Below is a simple program which shows email verification confirmation using a unique code, implemented in PHP,Mysql, Codeigniter. PHP Codeigniter Email Verification Step 1 :Create a table as shown below with email_verification_code as necessary column: [mysql] CREATE TABLE `users` ( `user_id` int(10) NOT NULL auto_increment, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `email_verification_code` varchar(45) […]
PHP Mysql Visitor Counter Script
If you want to add a counter to a web page or a website then use the below simple PHP Counter Script using MySql. It is very easy to implement it and it counts whenever a page is being refreshed and the script won’t reduce page speed, unlike page counter scripts. PHP Visitor Counter Script […]