Hello,
My situation:-
I was using the code below to change the background image of my web pages every month. The code was working fine for many months. It has suddenly stopped working though I can't figure out why. Could you help me debug this or propose a more reliable code?
My code is below:-
<?php
$festival = date('m');
echo $festival;
if ($festival == 10){echo "<body style=background-color: #CCFFFF background=deepavali2.gif>";}
if ($festival == 01){echo "<body style=background-color: #CCFFFF background=cny2.gif>";}
if ($festival == 12){echo "<body style=background-color: #CCFFFF background=christmas2.jpg>";}
if ($festival == 09){echo "<body style=background-color: #CCFFFF background=hari_raya2.jpg>";}
if ($festival == 08){echo "<body style=background-color: #CCFFFF background=merdeka.jpg>";}
if ($festival == 06){echo "<body style=background-color: #CCFFFF background=agung.jpg>";}
else{echo "<body style=background-color: #CCFFFF background=klcc1.jpg>";}
?>
Additional Info:-
The gifs & jpegs for the background images are definitely present in the same directory as the web pages.
I am using the same server as before.
My web host did some upgrading last month though I don't know exactly what they upgraded.
I've attached a screen shot to show you how my web page looks like now. The background image that you see is klcc1.jpg. It is supposed to have changed to merdeka.jpg for this month but it has not.
Thank you very much for your advice, time & trouble.
