Ciao a tutti, sto realizzando uno script che popola con un ciclo while una tabella....
la tabella è questa

codice:
  <table width="412" border="0">
    <tr>
      <th width="149" height="34" bordercolor="#0066FF" scope="row">Offerta n: </th>
      <td width="253">45</td>
    </tr>
    <tr>
      <th height="31" scope="row">Foto</th>
      <td>http:</td>
    </tr>
    <tr>
      <th height="21" scope="row">Nome lotto/Codice</th>
      <td>lbf56</td>
    </tr>
    <tr>
      <th height="21" scope="row">Categoria</th>
      <td>monete</td>
    </tr>
    <tr>
      <th height="33" scope="row">Descrizione</th>
      <td>ottima moneta</td>
    </tr>
    <tr>
      <th height="23" scope="row">Prezzo</th>
      <td>125 &euro; </td>
    </tr>
    <tr>
      <th height="21" scope="row">Note : </th>
      <td>ottimo</td>
    </tr>
    <tr>
      <th height="33" scope="row">Data inserzione :</th>
      <td>14/89/28</td>
    </tr>
    <tr>
      <th height="21" bgcolor="#0066CC" scope="row"></th>
      <td bgcolor="#0066CC"><div align="right" class="Stile1">Ordina Subito quest'offerta&lt;&lt; </div></td>
    </tr>
  </table>
Ho messo dei dati a caso per indicare i valori....
poi ho realizzato un file php in cui c'è l'estrazione dei dati e il ciclo while cosi :

codice:
<?
include("connessione.inc.php");
$query = "SELECT foto, data, id, categoria, codice, descrizione, prezzo, note FROM offerte ORDER BY id DESC LIMIT 5";
$result = mysql_query($query, $db); 
echo "<table width=\"412\" border=\"1\">
<tr>
<th width=\"149\" height=\"34\" bordercolor=\"#0066FF\" scope=\"row\">Offerta n:</th>
<th height=\"31\" scope=\"row\">Foto</th>
<th height=\"21\" scope=\"row\">Nome lotto/Codice</th>
<th height=\"21\" scope=\"row\">Categoria</th>
<th height=\"33\" scope=\"row\">Descrizione</th>
<th height=\"23\" scope=\"row\">Prezzo</th>
<th height=\"21\" scope=\"row\">Note : </th>
<th height=\"33\" scope=\"row\">Data inserzione :</th>
</tr>";
while ($row = mysql_fetch_array($result)) {
echo "<tr> 
<td width=\"253\">$row[id]</td>
<td>$row[foto]</td> 
<td>$row[codice]</td>
<td>$row[categoria]</td> 
<td>$row[descrizione]</td> 
<td>€ $row[prezzo]</td> 
<td>$row[note]</td>
<td>$row[data]</td> 
</tr> ";
}echo "</table>"; 
?>
mi crea la tabella...ma nn viene come la voglio io, cioè uguale a quella che ho postato sopra...dove sbaglio???grazie mille ciauz a tutti