El código es este
Código PHP:
<link href="../Stylesheet/general.css" rel="stylesheet" type="text/css">
<?
include('../acceso_db.php');
$sql = mysql_query("SELECT * FROM albums WHERE usuario_id='" . $_SESSION['usuario_id'] . "' order by id DESC") or die(mysql_error());
while ($row = mysql_fetch_array($sql)) {
$id = $row["id"];
$nombre = $row["nombre"];
$imagen = $row["imagen"];
$info = $row["info"];
?>
<table width="76%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21%"><div align="center"><img src="{<?=$imagen?>}" width="150" height="150"></div></td>
<td width="79%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="rotulo"><?=$nombre?></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<? $sql = mysql_query("SELECT * FROM canciones WHERE usuario_id='" . $_SESSION['usuario_id'] . "' AND nombre='" . $nombre . "'") or die(mysql_error());
if (mysql_num_rows($sql)) { // Comprobamos que exista el registro con la ID ingresada
$row = mysql_fetch_array($usuarios);
$nombre2 = $row["nombre"];
?>
<tr>
<td><?=$nombre2?></td>
</tr>
<? } ?>
</table></td>
</tr>
</table></td>
</tr>
</table>
<? } ?>
Me muestra un resultado solo. Alguna idea? Mil gracias