Ok, I'm really having a problem with this so any help will be greatly appreciated.
Here's the deal, using a date field in the database, I store my dates with the mktime() function.
What I'm trying to do with no luck is getting the script to compare the current time with the date stored in the DB. If the date in the DB is 5 days or less, then it should display the word "New", if older then 5 days, disply nothing.
Here's my code:
$date = $row['date']; // Get date out of DB
if ($date >= mktime()-(60*60*24*5))
{
echo" <FONT COLOR=red>New Pic!</FONT>";
}
else {}
Thanks for your help, and please, don't tell me to use strtodate() or something since I really need to see a working example.