Visualizzazione tabellare

<html><head>
<title>Lezioncina sul PHP3 - 21</title>
<body bgcolor=#ffffcc text=#000080 vlink=#0040cc link=#0080ff>
<table width=100% height=100%><tr>
<td width=90% valign=middle>
<h1 align=center><font size=+5>Visualizzazione tabellare</font></h1>
</td><td width=90 valign=middle><img src=php.jpg align=right border=0 
usemap=#mymap></td></tr>
<map name=mymap>
<area shape=rect coords=0,0,30,90 href=20.htm>
<area shape=rect coords=30,0,60,90 href=index.htm>
<area shape=rect coords=60,0,90,90 href=22.htm>
</map>
<tr>
<td height=80% valign=middle align=left colspan=2>
<font size=+3>
<table width=80% border=1>
<tr><th><font size=+3>Nome</font></th><th><font size=+3>Cognome</font></th>
<th><font size=+3>Numero di telefono</font></th></tr>
<?php
  $conn=pg_connect("dbname=lezione user=xyz");
  $rubrica=pg_Exec($conn,"select * from telefono;");
  $riga = 0;
  while ($indirizzo = @pg_fetch_object ($rubrica ,$riga)) {
    echo "<tr><td><font size=+3>$indirizzo->nome</font></td>\n";
    echo "<td><font size=+3>$indirizzo->cognome</font></td>\n";
    echo "<td><font size=+3>$indirizzo->tel</font></td></tr>\n";
    $riga ++;
  }
 ?>
</table>
<h1 align=center>[<a href=21.htm>Sorgente</a>]</h1>
</font></td></tr></table>
</body>
</html>