$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
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) […]
How to Do Debugging in Javascript
Below is the way to do debugging in Javascript to get typeof objForm, forms.elements and form value.
How to Create a Google Hangout Widget for Website
Google+ Hangout button for Website The Hangout button lets you launch a Google+ Hangout directly from your site. When you use the button, you can set up the Hangout in a variety of configurations. For example, you can specify Hangout apps that launch along with the Hangout and setup the Hangout as a regular Hangout […]