<html> 
<head><title>Dati</title> 
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head> 

<body bgcolor=#ffffff> 
<h1>Dati</h1>




<?php 
		include ("config.php");
mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase");  
$query = "SELECT * FROM users where last_name='$last_name' "; 
$result = mysql_db_query("$dbname", $query); 

if ($result) { 
  
echo "DATI AZIENDA"; 

while ($r = mysql_fetch_array($result)) {  
$last_name = $r["last_name"];
$via = $r["via"];
$citta = $r["citta"];
$cap = $r["cap"];
$piva = $r["piva"];
$telef = $r["telef"];
$fax = $r["fax"];

 
echo "<table width=300 border=1 cellspacing=0 cellpadding=0.3>
  <tr>
    <td width=89>Ditta</td>
    <td width=205>$last_name</td>
  </tr>
  <tr>
    <td>Via</td>
    <td>$via</td>
  </tr>
  <tr>
    <td>Citt&agrave;</td>
    <td>$citta</td>
  </tr>
  <tr>
    <td>Cap</td>
    <td>$cap</td>
  </tr>
  <tr>
    <td>P.Iva</td>
    <td>$piva</td>
  </tr>
  <tr>
    <td>Tel.</td>
    <td>$telef</td>
  </tr>
  <tr>
    <td>Fax</td>
    <td>$fax</td>
  </tr>
</table>"; 
} 
 

} else { 

echo "No data."; 

} 

mysql_free_result($result); 

 

?> 
</body> 
</html> 
