Ah, sorry above one is old program. Here is my newer program...
Really need your help! _"
# Now get old talks
$sql = "select * from $table_name order by date desc";
($debug) and print "sql: $sql<br>";
$handle = mysql($db_name,$sql);
$total = mysql_numrows($handle);
############################
# Sort Link
print "$sortOrder";
$count = 0;
$print_count = 0;
while ( $row = mysql_fetch_array($handle) ) {
# Parse and massage the time
$date_arr = split("-", $row[date]);
$start = split(":", $row[start]);
$finish = split(":", $row[finish]);
$timestart = mktime ($start[0],$start[1],0,$date_arr[1],$date_arr[2],$date_arr[0]);
$timefinish = mktime ($finish[0],$finish[1],0,$date_arr[1],$date_arr[2],$date_arr[0]);
$series=$row[series];
($row[title] == '') and $row[title] = "To Be Announced";
($debug) and print "$row[title]<br>";
($row[location] == '') and $row[location] = "(To Be Announced)";
($debug) and print "$row[location]<br>";
#################################################
# Show Year when the month is equal to September
$loop_today = mktime (0,0,0,date(m),date(d),$next_year);
$loop_semester_start = mktime (0,0,0,'9','1',$current_year);
# Show only future entries
if ($timestart < $loop_today)
{
if ($timestart > $loop_semester_start)
{
if ($print_count == 0)
{
print "<tr><td colspan=1><strong><h1><font color=brown>$current_year - $next_year</font></h1></strong></td></tr>\n";
$print_count++;
}
}
else
{
$current_year--;
$next_year--;
}
}
else
{
continue;
$print_count = 0;
}
$count++;