Thanks for the insight, although it didn't work for me. these are my code:
<?php
$_SESSION['start'] = $_GET['start'];
$_SESSION['end']= $_GET['end'];
?>
<?php
$end=$_SESSION['end'];
$start=$_SESSION['start']; $date_end=$end;
$date_start=$start;
$night=$date_end - $date_start;
?>
So immediately the $date_end enter the next month, it will give me a error value.