PDA

View Full Version : Load page for the month



moose86
05-20-2011, 11:32 PM
Hi all,

im trying to make a system where u have 1 page and as soon as u go on that page, it checks to see what the month is and will redirect (or simmler) to the unique page.

i.e,
January = page1.php
Febuary = page2.php
etc...

Thanks in advance :)

bluewalrus
05-21-2011, 01:32 AM
This should do it assuming you have the pages named page1.php through page12.php.


<?php
$month = date('n');
header("Location: page" . $month . ".php");
?>