I am trying to display an addition image next to an item if it was added to the database 3 days ago or less saying “new”?
In a table called movie there is a field called moviedateadded which stores when the movie was added to the table in DATE format e.g. 2011-09-01.
I’m guessing I need to get the current date from the server, and use an if else statement to say if the moviedateadded is 3 days or less than the server time, echo out “new.jpg”?
Please confirm the best way to do this?
Thanks in advance.
According to your code (edited also <= for 3 or less instead of more than 3