<?php
include("common/connection.php");
$start12=$_REQUEST['start12'];
$finish12=$_REQUEST['finish12'];
//$Rate=$_REQUEST['Rate'];

/*$date1 = strtotime(date('Y-m-d',strtotime($start12)));  
$date2 = strtotime(date('Y-m-d',strtotime($finish12)));   
  
// Formulate the Difference between two dates 
$diff = abs($date2 - $date1);  
  
  
// To get the year divide the resultant date into 
// total seconds in a year (365*60*60*24) 
$years = floor($diff / (365*60*60*24));  
  
  
// To get the month, subtract it with years and 
// divide the resultant date into 
// total seconds in a month (30*60*60*24) 
$months = floor(($diff - $years * 365*60*60*24) 
                               / (30*60*60*24));  
  
  
// To get the day, subtract it with years and  
// months and divide the resultant date into 
// total seconds in a days (60*60*24) 
$days = floor(($diff - $years * 365*60*60*24 -  
             $months*30*60*60*24)/ (60*60*24)); 

echo $totaldays=$days+1;
//echo $total=$totaldays*$Rate;*/

$date1 = date_create($start12);
$date2 = date_create($finish12);

//difference between two dates
$diff = date_diff($date1,$date2);

//count days
 $diff->format("%a");

echo $diff->format("%a")+1;
?>