How can I display a different div background color according to a deadline established into a mysql database data ?
i.e.
Mysql date: 10-10-2012
display background-color: #FF9999 if today is from “before” to 1-10-2012
display background-color: #FF0000 if today is from 1-10-2012 to 10-10-2012
display background-color: #FFFFFF if today is from 10-10-2012 to “after”
thanks
E.g. (untested):
define in your stylesheets:
in your php:
=== UPDATE ===
Reading a timestamp from a mysql database: