Snippet details
ID: 535
Viewed: 1093
Added: 2007-01-09
Version: 1.0
Sorry no demo
Makes the site header change when it's Christmas, Easter, Halloween, etc
Just put the code where you put your Header image.
Just put the code where you put your Header image.
<!---Head--->
none
<!---Body--->
<div id=header>
<?php
//Defines the date so we can use it later(in months)
$date = date(F);
//If the date(); function says it's december, it'll echo the following code
if ($date == 'December') {
echo'<img src="imgs/xmas.gif" alt="happy christmas!" height="150" width="600" align="top" border="0" />';
//If the date(); function says it's October, it'll echo the following code
} elseif ($date == 'October') {
echo'<img src="imgs/halloween.gif" alt="Rawr" height="150" width="600" align="top" border="0" />';
//if it isn't any of them, it's echo the normal header image
} else {
echo'<img src="imgs/header.gif" alt="Welcome to My Site!" height="150" width="600" align="top" border="0" />';
}
?>
</div>
No Reviews to show
