El codigo es el siguiente:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="../includes/estilos.css" rel="stylesheet" type="text/css">
<style type='text/css'>
.scroll { height: 401px;
overflow-x: hidden; overflow-y: auto; }
</style>
</head>
<body bgcolor="#CDCDCD">
<table class="tabla_listado" bgcolor="#FFFFFF" width="850" border="3" cellpadding="0" cellspacing="0">
<thead>
<tr>
<td width="135" align="center">Fecha de entrada</td>
<td width="130" align="center">Hora de entrada</td>
<td width="130" align="center">Fecha de salida</td>
<td width="130" align="center">Hora de salida</td>
<td width="300" align="center">Nombre</td>
<td width="80" align="center" >Turno</td>
</tr>
</thead>
<?
//nos conectamos a mysql
$conexion = conectar ();
//consulta.
$sql = "SELECT * FROM asistencia ORDER BY fecha_ent DESC, hora_ent DESC";
$res= mysql_query($sql) or die (mysql_error());
echo "<tbody class='scroll'>";
echo "<tr>";
if( mysql_num_rows($res) >0){
//impresión de los datos.
while (list($dato 1,$dato 2,$dato 3,$dato 4,$dato 5,$dato 6) = mysql_fetch_array($res)) {
echo "<td align='center'>$dato1</td>\n";
echo "<td align='center'>$dato2</td>\n";
echo "<td align='center'>$dato3</td>\n";
echo "<td align='center'>$dato4</td>\n";
echo "<td style='padding-left:10px'>$dato5</td>\n";
echo "<td align='center'>$dato6</td></tr>\n";
}
echo "</tbody>";
}else{
echo "<td colspan='6' align='center' >no se obtuvieron resultados</td>";
}
mysql_close($conexion);
?>
</table>
</body>
</html>
Espero que alguien pueda ayudarme, Muchisimas gracias






Mode Lineal
