Webmaster Forum

Webmaster Forum (http://www.v7n.com/forums/index.php)
-   Coding Forum (http://www.v7n.com/forums/forumdisplay.php?f=16)
-   -   Display image based on date using PHP (http://www.v7n.com/forums/showthread.php?t=421102)

HTMLBasicTutor 10-09-2017 01:12 PM

Display image based on date using PHP
 
I want to create a banner cycle that changes automatically based on date.

Sometimes it would stay for the whole month. Sometimes just for a special day.

Is the solution in the original question here: Display image based on date in PHP still viable to use as a basis to start mine with considering the new PHP updates?

The site does not use Wordpress so don't bother suggesting a Wordpress plugin. Do not want to use JavaScript/Ajax in case someone arrives with scripting turned off.

Thanks!

<edit>
I found a newer solution here: Display a Different Image Each Day with PHP . Any better?
</edit>

J. H. Rasmussen 10-09-2017 01:24 PM

Yes the PHP-code on the webpage you link to, should still work. Remember to set the timezone before using date functions.

HTMLBasicTutor 10-09-2017 01:48 PM

Thanks!
Quote:

Originally Posted by J. H. Rasmussen (Post 2309951)
Remember to set the timezone before using date functions.

Good point because the server time zone is different than mine. ;)


All times are GMT -7. The time now is 12:41 AM.

3.8.7