snippet library logo
in category
PHP / Misc / Season changer
Snippet details
ID: 535
Viewed: 1093
Added: 2007-01-09
Version: 1.0
Sorry no demo

User Rated at: 5 Stars
Rate This:
Snippets in this catagory         
Show Printable Version
Makes the site header change when it's Christmas, Easter, Halloween, etc

Just put the code where you put your Header image.

General Details
Snippet uploaded by: swiftys
Email : samuelsweeney@hotmail.com
Snippet By: Swifty

<!---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


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.