Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/04/2007, 07:12
Avatar de el cirujano
el cirujano
 
Fecha de Ingreso: mayo-2003
Ubicación: Frente al PC
Mensajes: 609
Antigüedad: 21 años
Puntos: 3
Re: Mostrar consulta en una tabla

Código PHP:
<html>
<body>
<table border=1 align=center width=100%>
<tr>
<th BGCOLOR = #FFAA56>ID OS </th>
<th BGCOLOR = #FFAA56>OBRA SOCIAL</th>
<th BGCOLOR = #FFAA56>DESCRIPCION</th>
<th BGCOLOR = #FFAA56>TELEFONO</th>
</tr>
<?php
include('conexion.php');
$con=conexion();
$consulta "select * from obras_sociales";
$x=mysql_query($consulta);

while (
$datos=mysql_fetch_array($x))
{
echo 
"<tr>
<td ALIGN = CENTER>"
.$datos[0]."</td> <td ALIGN = CENTER>".$datos[1]."</td>
<td ALIGN = CENTER>"
.$datos[2]."</td> <td ALIGN = CENTER>".$datos[3]."</td>
</tr>"
;
}
?>
</table>
</body>
</html>
__________________
CSS2 + AJAX + PHP + MySQL, una mezcla sin competencia!!!!!!