Amigos.
Hago una consulta para traer un conjunto de datos y estos puedan ser desplegados en una tabla.
Código PHP:
$consulta=mysql_query("SELECT nombre_file,tipo_file,peso_file,com_file,fecha_file,publicado_por
FROM tbarchivo where tbusuario_id_user='$patron'")or die(mysql_error());
Después dentro de la misma página. hago el despliegue de datos.
Código HTML:
<?PHP
while($salida = mysql_fetch_array($consulta)) {
?>
<td height="22"><div align="center"><?PHP echo $b++ ?></div></td>
<td height="22"><div align="center"><?=ucfirst($salida[nombre_file])?></div></td>
<td height="22"><div align="center"><?=ucfirst($salida[tipo_file])?></div></td>
<td height="22"><div align="center"><?=ucfirst($salida[fecha_file])?></div></td>
<td height="22"><div align="center"><?=ucfirst($salida[peso_file])?></div></td>
<td height="22"><div align="center"><img src="../../ICON/Lupa2.JPG" alt="<?= ucfirst($salida[com_file])?>" width="20" height="20" align="baseline"></div></td>
<td height="22"><div align="center"><a href="../DESCARGA/descarga.php?urldir=<?PHP echo $ruta; ?>&filename=<?=$salida[nombre_file]?>"><img src="../../ICON/download.gif" alt="Descargar" width="27" height="27" border="0" align="baseline"></a></div></td>
</tr>
<?PHP
} //Cierre While ?>
Y así como esta no me despliga ningun resultado, porque aparentemente no esta entrando al while, lo acabo de probar con un mensaje tipo echo "no entra al bucle"