io ho questa query:
Vorrei che i risultati venissero salvati in questa tabella:Codice PHP:<?
include("config.inc.php");
include("connect.inc.php");
$query = "SELECT id, marca, modello, prezzo, anno, kw, colore, km, optional FROM usato ORDER BY id ";
$result = mysql_query($query, $db);
while ($row = mysql_fetch_array($result))
{
//così dovrei passare i dati alle variabili??????????????
$nome1 = htmlentities($row['marca']);
$nome2 = htmlentities($row['modello']);
$nome3 = htmlentities($row['prezzo']);
$nome4 = htmlentities($row['anno']);
$nome5 = htmlentities($row['kw']);
$nome6 = htmlentities($row['colore']);
$nome7 = htmlentities($row['km']);
$nome8 = htmlentities($row['optional']);
}
include("tabella.htm");
mysql_close($db);
?>
nei campi della tabella ho provato tuttocodice:<html> <head> <meta http-equiv="Content-Language" content="it"> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>MARCA</title> </head> <body> <table border="1" width="100%" id="table1"> <tr> <td>MARCA</td> <td>MODELLO</td> <td>PREZZO</td> <td>ANNO</td> <td>KW</td> <td>COLORE</td> <td>KM</td> <td>OPTIONALS</td> </tr> <tr> <td><?php echo $row[$nome1] ?></td> <td><?php echo [$nome2]?></td> <td><?php echo $row[nome3] ?></td> <td><?php echo [nome4] ?></td> <td><?php echo $nome5 ?></td> <td><?php echo nome6; ?></td> <td><?php echo $row[$nome7] ?></td> <td><?php echo $row[nome8] ?></td> </tr> </table> </body> </html>
VVoVe:
Cosa sbaglio???

VVoVe:
Rispondi quotando
