Menu
I am trying to make a list that will only show events that have happened. The event is put in by month day and year. Here is my code:
[code=php]
$todaysdate = strtotime(‘now’);
$sql = “SELECT * FROM cle”;
$result=mysql_query($sql) or die(“Couldn’t execute query: “.mysql_error());
while ($rows=mysql_fetch_array($result)) {
$month = $rows[‘month’];
$day = $rows[‘day’];
$year = $rows[‘year’];
$cutoffdate = strtotime($month/$day/$year);
if($cutoffdate <= $todaysdate){
echo ‘<tr><td>’.$topic.'</td></tr>’;
} else {
echo “”;
}