Código PHP:
<?php
session_start();
?>
<html>
<head>
<style type="text/css">
#primero {
text-align:center;
font-family:Castellar;
font-size:16px;
font-weight:bold;
height:0px;
}
#tabla{
clear:both;
}
div.centraTabla{
text-align: center;
}
div.centraTabla table {
margin: 0 auto;
text-align: left;
}
#centrar {
border:4px solid black;
margin:0 auto;
}
</style>
</head>
<body>
<div id="primero">
<div id="escudo">
<img src="IMG-20150611-WA0016.jpg" width="106" height="161" /><br /><br />
INGRESOS </div>
<br />
</div>
<div class="centraTabla" id="tabla" >
<?php
$conexion = mysqli_connect("localhost","root","","adma");
$consulta = mysqli_query($conexion,"select * from ingresos");
$nfilas = mysqli_num_rows($consulta);
if ($nfilas > 0) {
echo "<table id='centrar' border='solid' align='center' width='80%' border='1' cellspacing='0' cellpadding='0' valign='middle' style='border-collapse':collapse'>";
echo "<tr><td> <b>Referencia</b> </td><td><b>Fecha</b></td><td> <b>Concepto </b></td><td><b> Cantidad</b> </td><td><b> Precio</b> </td><td> <b>Total</b> </td></tr>";
for ($i=0;$i<$nfilas;$i++){
echo "<tr>";
$fila=mysqli_fetch_array($consulta);
echo "<td>" , $fila["referencia"] , "</td><td>" , $fila["fecha"] , "</td><td>" , $fila["concepto"] , "</td><td>" , $fila["cantidad"] , "</td><td>" , $fila["precio"] , "E", "</td><td>",$fila["total"],"E","</td>";
echo "<br />";
}
echo "</table>";
}
?>
<br />
</div>
</body>
</html>
Muchas gracias!!
![Aplauso](http://static.forosdelweb.com/fdwtheme/images/smilies/aplausos.gif)
![Aplauso](http://static.forosdelweb.com/fdwtheme/images/smilies/aplausos.gif)