Good Morning,
I am trying to run a mysql query to see if the field 'Date' is within 7 days of the current date or not. If it is less than 7 days old, I want to echo an image called current.jpg. If it is more than 7 days old, I want to echo an image called notcurrent.jpg. I have been close but still cant seem to get it....Any help would be appreciated.
<?php
$Now = time();
$Lastweek = time() - (7 * 24 * 60 * 60);
if($row['Date']<= $Lastweek) {
echo "<img src='/images/current.jpg' width='80' height='75'><br>";
} else if ($row['Date'] > $Lastweek) {
echo "<img src='/images/notcurrent.jpg' width='80' height='75'><br>";
}
?>