I'm hosting an antique links area of my website. The links are dynamically pulled from a MySQL table via PHP pages. MySQL returns the valid web links depending on the category a viewer chooses.
From the returned query results, I'd like to show "New Link" beside the name of those sites added in the previous 30 days. I'd like to do this in some manner other than manually updating the database table each day.
When a site owner submits a site for linking, the php form pushes the current "created" date to a date field in the MySQL table.
The way I see it, when a category link is pressed by the browser, PHP compares the current server date to the date in the link table. If the difference is less than or equal to "30", then I show "New Link" text. I have a mental block/tunnel vison on making the date comparison "if" work.
Does anyone have experience with date comparisons to get me started in the general direction?