=1900) && ($theYear <=2000)) { // If it's in the correct range $checkedYear = 10 * floor($theYear / 10); // Convert to nearest decade } } $checkedYear = max($checkedYear, 1900); // If checkedYear is 0, make it 1900 // Set cookie, no-caching headers header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 // header("Set-Cookie: cts_time_year=$checkedYear; expires=''"); setcookie ("cts_time_year", "$checkedYear"); // include("$checkedYear.html"); header ("Location: $checkedYear.html"); ?