Jump to content

mumford

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by mumford

  1. Andy B, that looks like it will be the best response I have received over 2 days, thank you!

    I suppose if I need to have other items that rotate on a daily basis I just inser the same code but change the filenames eg

    [code]<?php
    $doty = date("z"); // day of the year
    $doty_remainder = $doty % 5 ; // remainder of day of the year divided by 5
    $the_file = "[b]dynamic/offers[/b]_". $doty_remainder. ".php"; // edit path info to suit
    include($the_file);
    ?>[/code]

    Also as a matter of interest if I did want those 5 pages to rotate randomly is there a way of adjusting the code you gave or would it be something different entirely?

    Thanks again
  2. Hi

    I am VERY new tp php, and found this script on php freaks, it is a randomizer script

    [code]<?
    /* Directory Structure
    /index1.htm
    /index2.htm

    */
    srand((double)microtime()*1000000);
    $num = rand(1,2);

    include ('index'.$num.'.htm');

    ?>[/code]

    What I need to happen on my website is 3 blocks of text each in its own div to change every day (5 days to be precise), I got the above to work but as I said it is just a randomizer so each time you refresh it changes.

    Also my dynamic content pages will sit in its own folder, and I would like to name the pages depending on what they are, eg, capetown.htm, garden-route.htm

    Does that make sense, hope someone can help me!

    thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.