Codice PHP:
<?php
$con = mysql_connect("62.149.150.153","Sql540669","5f2b3c77");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Sql540669_1", $con);
$clienti = mysql_query("SELECT * FROM agenzie ORDER by -id", $con);
?>
<table>
<tr>
<td width="60">Nome </td>
<td width="60">Cognome</td>
<td width="60">Via</td>
<td width="60">N Civ</td>
<td width="60">CAP </td>
<td width="60">Città </td>
<td width="60">Prov </td>
<td width="60">Tel</td>
<td width="60">Cell</td>
<td width="60">Mail</td>
<td width="60">Fisc</td>
<td width="60">Sopr</td>
<td width="60">File </td>
</tr>
<?php
while ($cl = mysql_fetch_array($clienti) ) {
?>
<tr>
<td width="60"><?php print"{$cl["nome"]}";?></td>
<td width="60"><?php print"{$cl["cognome"]}";?></td>
<td width="60"><?php print"{$cl["via"]}";?></td>
<td width="60"><?php print"{$cl["civ"]}";?></td>
<td width="60"><?php print"{$cl["cap"]}";?></td>
<td width="60"><?php print"{$cl["citta"]}";?></td>
<td width="60"><?php print"{$cl["prov"]}";?></td>
<td width="60"><?php print"{$cl["tel"]}";?></td>
<td width="60"><?php print"{$cl["cell"]}";?></td>
<td width="60"><?php print"{$cl["mail"]}";?></td>
<td width="60"><?php print"{$cl["fisc"]}";?></td>
<td width="60"><?php print"{$cl["sopr"]}";?></td>
<td width="60">[url="<?php print"]">[/url]</td>
</tr>
<?php } //end while ?>
</table>
In questo per ora riga della tabella del database ti crea una riga nella tabella html.