Ok I want to make a news script, this is what I have in mind.
I'll make the entries go into a database which also has a date field, then when I wanna display them i'll sort by the date and display 7 (for the week).
The problem is, how do I make all old news expire?
I was thinking to just subtract 7 from the current date and then use the "WHERE" parameter for mysql and delete anything from 7 days ago, but what if the date is January 4th, 2001. You can't subtract 4 from 7. Is there a way I can get the date properly from 7 days ago? or does anyone know a better way of going about making the news script?