Skip to content

Bug fix on the seminar apps

Every December the Next month seminars would show the whole past year. It was a scripting bug that I have fixed now. Since it is december next month it should default to January and forwards, but there is also a tab with Next years seminars so instead I added a message that it is the end of this year and look at next year for future seminars.

Here is the PHP code if you want include it on your web site.

<?php
$nextmonth = mktime(0, 0, 0, date(“m”)+1);
$monta = date(“m”, $nextmonth);
if ( $monta == “01” )
{ $yerra = date(“Y”)+1 ;
echo “<p>It is probably December now, click on Seminars next year</p>”;
}
else
{ $yerra = date(“Y”) ;
$ch = curl_init(“http://toryu.se/cgi-bin/SEMINARS-ME2.cgi?$yerra-$monta”);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
}
?>

If you want more examples how to display seminars from the database on your web site, please don’t hesitate to contact me.
I really do encourage all web masters to use any code they want (mine or modified) to display seminars from the seminar database.