Not a Member Yet,
Click here to Register

ID: 535
Viewed: 3728
Added: Jan 08, 2007
Version: 1.0
Snippet uploaded by: swiftys
Written By: Swifty
Demo: Sorry, no demo



User Rated at: 5 Stars5 Stars5 Stars5 Stars5 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

Makes the site header change when it's Christmas, Easter, Halloween, etc

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 Comments to show

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


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2024 snippetlibrary.com All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!