Results 1 to 2 of 2

Thread: Load page for the month

  1. #1
    Join Date
    Dec 2009
    Posts
    54
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Question Load page for the month

    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

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    This should do it assuming you have the pages named page1.php through page12.php.
    PHP Code:
    <?php
    $month 
    date('n');
    header("Location: page" $month ".php");
    ?>
    Corrections to my coding/thoughts welcome.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •