Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/08/2009, 02:16
Avatar de aliza
aliza
 
Fecha de Ingreso: diciembre-2008
Mensajes: 156
Antigüedad: 15 años, 5 meses
Puntos: 6
Respuesta: tabla de resultados

<?php
$conexion = mysql_connect("localhost", "mihueb_kijosh", "clave");
mysql_select_db("mihueb_demo2", $conexion);

$queEmp = "SELECT * FROM empresa ORDER BY nombre ASC";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Agenda</title>
<style type="text/css">
<!--
body {
font-family: "Trebuchet MS", Tahoma, Verdana;
font-size: 12px;
font-weight: normal;
color: #666666;
text-decoration: none;
padding: 120px;
}
h4 {
color: #CC0000;
}
-->
</style>
</head>
<body>
<table>
<caption><h4>Agenda</h4></caption>
<?php
if ($totEmp> 0) {
while ($rowEmp = mysql_fetch_assoc($resEmp)) {
echo "<tr>";
echo "<td><strong>".$rowEmp['nombre']."</strong></td>";
echo "<td><strong>".$rowEmp['direccion']."</strong></td>";
echo "<td><strong>".$rowEmp['telefono']."</strong></td>";
echo "<td>Imagen: ".$rowEmp['imagen']."</td>";
echo "</tr>";
}
}
?>
</table>
</body>
</html>

A ver si con esto te vale.
__________________
Dando cabezados se aprende...