Ragazzi ho creato questo codice che dovrebbe restituire i telefilm presenti in un database ordinati per nome e suddivisi in gruppi di 5. Quando ho provato ad eseguire questo codice ho ottenuto il seguente errore: Internal Server Error 500

Dove sbaglio?

Codice PHP:
$query1 "SELECT count(distinct Titolo) AS Tot FROM telefilm"$result1 mysql_query($query1); $row1 mysql_fetch_array($result1MYSQL_ASSOC); echo $row1[Tot]; echo "
"
$start=-5$step=5; while ($row1[Tot] >=0) { $contatore $row1[Tot]; $contatore $contatore 5; echo $contatore; echo "
"
$start $start 5; echo $start; echo "
"
$query "SELECT distinct Titolo FROM telefilm ORDER BY Titolo ASC LIMIT " $start "," $step$result mysql_query($query); $numfields mysql_num_fields($result); echo '<table width="150" border="0" cellpadding="0" cellspacing="1" align="center" class="bordotab">'; echo "<th>"; echo "</tr>\n"; while ($row mysql_fetch_array($resultMYSQL_ASSOC)) { //echo "" echo "<tr>"; echo '<td class="classetd" width="16%">'; echo "<a href=\"view.php?Titolo=$row[Titolo]\"> " . implode($row,'</td><td>') . "</td></tr>\n"; } echo "</table>\n"; }