Originally posted by motorbelly
I am having a lot of trouble with this and I really apprecaite you input today.
I didn't understand the need for a database but I gather it is to help start the week on Sunday?
The "need for a database" should be translated simply "the need for PHP to know what the last week was so it could determine whether or not to change colors."
In effect, then, the first solution would cause PHP to change a marker (either held in a database or a writable text file on the server, hence my comment "decide where you're gonna store this") upon the first loading of the page when the week had changed, and the IF clause would be checked, but not evaluated to true, for every other page load.
HalfaBee's solution is much more elegant; mine is a kludge --- just in case you wanted to know what those terms meant. His solution builds on the fact that PHP already knows which ordinal week of the year it is. It will check on each page load and respond correctly. The only potential advantage mine has is that, as I mentioned, I started it on Sunday.
As for your remaining issues, HalfaBee's got you covered 😉