Ciao a tutti, ho bisogno di un altro aiuto.
Devo creare una tabella per visualizzare immagini.
Le immagini le pesco dal database ma non riesco a farle visualizzare tre per riga,
vengono disposte una sotto l'altra a centro pagina.
Codice PHP:<?php
$evento = $_GET['evento'];?>
<?php
$dbcnx = mysql_connect('host', 'utente', 'passwd');
mysql_select_db('db', $dbcnx);
$res = mysql_query ('select * from gal2008 where evento = "'.$evento.'" ORDER BY id DESC');
$num = mysql_num_rows ($res);
?>
<table style="width: 800px" class="style6" align="center">
<tr>
<td align="center" style="height: 35px">
[b]
IMMAGINI IN MINIATURA
[/b]
</td>
</tr>
</table>
<?php
for ($i=0; $i<$num; $i++)
{
$file = mysql_result ($res, $i, 'file');
echo "<Table Width=\"100%\">";
echo "<Tr>";
echo "<Td Width=\"100%\" align=\"center\">";
echo "<img src=\"album2008/thumbs/$file\" alt=\"Foto\" title=\"Foto\">";
echo "</Td>";
echo "</Tr>";
echo "</Table>";
}
?>

Rispondi quotando