<?php

@mysql_connect("mysql.csail.mit.edu","filmsai","filmsAI+3456") or die("Foo!");
@mysql_select_db("filmsAI") or die("Bar!");

$entry=@mysql_query("SELECT * FROM `testTJG2` ORDER BY date ASC");
if (empty($year)){
echo('<p>Bertrand Russell and Alfred North Whitehead published Principia  Mathematica, which revolutionaized formal logic. Russell, Ludwig  Wittgenstein, and Rudolf Carnap lead philosophy into logical analysis  of knowledge.</p>
<p><strong>1923: </strong>Karel Capek\'s play &quot;R.U.R.&quot;(Rossum\'s Universal Robots) opens in London. - First use of the word \'robot\' in English.</p>
<p><strong>1943: </strong>Warren McCulloch &amp; Walter Pitts publish &quot;A Logical Calculus of  the Ideas Immanent in Nervous Activity&quot; , laying foundations for  neural networks.</p>
<p>Arturo Rosenblueth, Norbert Wiener &amp; Julian Bigelow coin the  term &quot;cybernetics&quot; in a 1943 paper. Wiener\'s popular book by that name  published in 1948.</p>
');
}
else{
$c=$year+5;
$tltextfetch=@mysql_query("SELECT * FROM `Timeline data2` WHERE ( year >= $year and year < $c ) ORDER BY year ASC");
$m=0;

while ($tlcurrent = mysql_fetch_array ($tltextfetch)){
$tlyear[$m]=$tlcurrent['year'];
$tldata[$m]=$tlcurrent['data'];
$tldata[$m]=str_replace("/////","<br>" ,  $tldata[$m]);
echo('<br><b>'.$tlyear[$m].'</b> : '.$tldata[$m]);
$m++;
}
}

?>