Ho modificato il codice xke ho riscontrado degli errori, quindi vi riporto il codice completo qui di seguito:
Il codice, anche dopo la correzzione di alcuni errori continua a non funzionare, mi stampa a video solo le parentesi vuote.. come se le query che facesse fossero tt vuote, ma non è cosiCodice PHP:
<?php
if(isset($_GET['tid']))
{
$tid = $_GET['tid'];
$query = "SELECT title FROM telefilms WHERE id='$tid'";
$results = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($results);
echo "Elenco degli attori di $row[title]";
}
start_season();
?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<?php
if(isset($_GET['tid']))
{
$query2 = "SELECT * FROM casts WHERE id='$_GET[tid]'";
$results2 = mysql_query($query2) or die (mysql_error());
$row2 = mysql_fetch_array($results2);
if($row2['imid'] != '')
{
$id_img = $row2['imid'];
$query3 = "SELECT * FROM images WHERE id='$id_img'";
$results3 = mysql_query($query3) or die (mysql_error());
$row3 = mysql_fetch_array($results3);
$width = 100;
$div = $row3['width'] / $width;
$nh = $row3['height'] / $div;
echo "<table width=\"100%\"><tr><td rowspan=\"2\"><a href=\"$row3[image]\"><img src=\"$row3[image]\" width=\"$width\" height=\"$nh\" /></a></td>";
}
else
{
echo "<table width=\"100%\"><tr>";
}
$query4 = "SELECT tname FROM actors WHERE id='$row2[acid]'";
$results4 = mysql_query($query4) or die (mysql_error());
$row4 = mysql_fetch_array($results4);
echo "<td>$row2[fname]($row4[tname])</td></tr><tr><td>$row2[partDescription]</td>
</tr></table>";
}
?>
</table>
?>