Take a look at the code below:
I think its quite obvious what I want to do, if the event date is greater than todays date, then it should say Future, and if not, it should display Past...
But at the moment all fields are displaying future, although there are some with 'event_date' for dates gone by
Please take a look at the code, and inform me if there is an error
Make Sense? I hope so (-:
Code:
<?
$today=date("d/m/Y");
echo "<table border='0' cellpadding='1' cellspacing='2' width='100%'>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
if ($row[event_date]>$today) {
echo "<td>Future</td></tr>"; }
else {
echo "<tr><td>Past</td></tr>"; }
echo "<td id='gigsHeadline'>" . $row['event_name'] . "</td></tr><tr>";
echo "<td id='gigsSynopsis'>''" . $row['tag_line'] . "''";
echo $today;
echo $row[event_date];
echo "</td></tr>";
}
echo "</table>";mysql_close($con);
?>
I think its quite obvious what I want to do, if the event date is greater than todays date, then it should say Future, and if not, it should display Past...
But at the moment all fields are displaying future, although there are some with 'event_date' for dates gone by
Please take a look at the code, and inform me if there is an error
Make Sense? I hope so (-: