I am looking for a way to have specific web pages load depending on the date. For example, the first week of the month a particular page would load and the remainder of the month another. Thanks in advance.
I am looking for a way to have specific web pages load depending on the date. For example, the first week of the month a particular page would load and the remainder of the month another. Thanks in advance.
Maybe this will give you a starting point;
PHP Code:<?php // special date is November 1st 2010
$spec_date = '2010-11-01';
$todays_date = date('Y-m-d');
$today = strtotime($todays_date);
$special_date = strtotime($spec_date);
if ($special_date == $today)
{ ?>
<!-- put special one-day content here -->
<p>You are seeing this content because the date is November 1st 2010.</p>
<?php } else { ?>
<!-- put other content here -->
<p>Usual content.</p>
<?php } ?>
Focus on Function Web Design
Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps
You could also use the include() function to store the two pages as separate files.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks