I have created a module in which I can change an image on every refresh.
Now I want to change the image every day and not on every refresh.

Pls HELP

Comments

Silvion’s picture

give me a couple of mins ill see what i can do.

EDIT:
You will need to get someone else to have a look at this cause its wrong on line 2 but i cant figure it out..

<?php 
 switch (date(checkdate()){
 
 $names = array("idate());
  // First Case
  case "Monday":
  $banner = "./Monday.gif";
 break;
  // Second case
  case "Tuesday":
  $banner = "./Tuesday.gif";
  break;
  //Third case
  case "Wednesday":
  $banner = "./Wednesday.gif";
  break;
  // forthcase
  case "Thursday":
  $banner = "./Thursday.gif";
  break;
  //Fifth case
    case "Friday":
  $banner = "./Friday.gif";
  break;
  //if non of them match
  default:
  $banner = "./nomatch.gif";
  break;
  }
 ?>
junedkazi’s picture

JUNED KAZI
junedkazi@gmail.com

I know this what I want is as follows;
Assume there r only 4 images and u want to rotate them in an order throughout the week or month then what I should do.

mkalbere’s picture

Several mistakes:
switch (date(checkdate())-> switch (date("D"))

a `"`is missing at $names = array("idate()); but you don't need it with the line before just use

case "Mon": //do your stuff

cf http://ch2.php.net/date