function check_transport_time($deptime, $rettime){ include_once 'functions.php'; sethin(); $deptimeXS = strtotime($deptime); $rettimeXS = strtotime($rettime); $duration = $rettimeXS - $deptimeXS; $dur = 210 * 60 ; // making 3 1/2 hours as seconds if ($duration > $dur) { include_once 'menu_html.php'; display_confirmation ("Error", "The return time is more than 3 1/2 Hours from Departure Time. Please go back to fix this"); } }