Forum Moderators: phranque
On a certain page on a web site I am building, I would like there to be a message displayed. Just a simple, single line message.
What I am trying to figure out is how I can easily set it up so that the message gets switched out every week.
So, let's say I could compile all the messages I want, maybe 50 or so, and put them all in a single file, or separate files, or however it is set up. Then, every week, one is taken out and the next put in it's place automatically on that page.
What is the easiest way to do this?
Thank you.
the easiest way would be to use a cgi script or php, but you could probably also do something with javascript.
if your server supports SSI you could do something like:
<!--#config timefmt="%W" -->
<!--#set var="week" value="$DATE_LOCAL" -->
<!--#if expr="$week = /1/" -->
<!--#include virtual="week_1.txt" -->
<!--#elif expr="$week = /2/" -->
<!--#include virtual="week_2.txt" -->
.
.
.
<!--#endif -->