On my search page http://daparadise.com/search.php i want to make the logo auto change when a certain day comes up. Say like christmas. our a birthday or something like that. So how would i make the logo change in php when these days come up?

Recommended Answers

All 3 Replies

you can try this

$date= date('m-d');

if ($date == '12-25' )
{
 $logo= 'christmas.gif';
}
else
{
$logo = 'normal.gif';
}
Member Avatar for diafol

That of course will be set to your (server) timezone. In order to set it to the user's timezone (so it will appear at different instances for different users), you need to get the user's TZ (or time) from the client.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.