Muchas Gracias Por Responder
pateketrueke, Entendi mas o menos pero te voi a explicar mejor para ver si me entienden:
Lo Que Estoy haciendo es un sistema de usuario que ya esta bien programada y quiero mostrarle el registro dinamico de la base de datos de lo que hay ahi, te voi a dejar el codigo completo :
Código PHP:
<?
include('config.php'); //incluimos el config.php que contiene los datos de la conexión a la db
# poniendole nombre a la lista de musica para descargar, osea poniendole variable para mostrar a los resultados
$iddelarchivo = $row_mostrarlistademusica['id_file'];
$nombredelmp3 = $row_mostrarlistademusica['file_name'];
$contadordescargas = $row_mostrarlistademusica['count_click_download'];
$fechadesubida = $row_mostrarlistademusica['upload_date_file'];
$descripcion = $row_mostrarlistademusica['descripcion'];
$subidopor = $row_mostrarlistademusica['upload_by'];
if(!isset($_SESSION[usuario]) ) //comprobamos que no existe la session, es decir, que no se ha logeado, y mostramos el form
{
//Creamos el form k irá a autentificar.php para comprobar los datos con la tabla users
echo '
<table border="0" cellpadding="1" cellspacing="3" class="file_slot">
<tr>
<td>Descargalo:</td>
<td><strong>Listado de Musica</strong></td>
<td><strong>Descargado:</strong></td>
<td><strong>Fecha de Subida</strong></td>
<td><strong>Subido por:</strong></td>
<td><strong>descripcion</strong></td>
</tr>
<tag> <?php do { ?> </tag>
<tr>
<td><a href="ver.php?id_file='.$iddelarchivo.'"><img src="img/bajarlistado.png" width="62" height="23" alt="Descargar" /></a></td>
<td><a href="http://vm-download.com/ver.php?id_file='.$iddelarchivo.'">'.$nombredelmp3.'</a></td>
<td>'.$contadordescargas.'</td>
<td>'.$fechadesubida.'</td>
<td>'.$subidopor.'</td>
<td>'.$descripcion.'</td>
</tr>
<tag> <?php } while ?><tag>
</table>
';
}else{
//SI se ha logeado, mostramos el nick y la opción de deslogearse
//Este sería el menú que saldría a la gente que esta logeada, se puede modificar y añadir cosas
echo '<br><a href=logout.php><span class="Estilo25">Bienvenido '.$_SESSION[usuario]; echo ' (Cerrar Sesion)'; //ej Bienvenido Juan
echo '</a><br>Tu level es</span> '.$_SESSION[level]; //mostramos el level del user
if($_SESSION[level] == 1)
{
//mostramos el link para ir a la pagina privada porque el user tiene level 1 (*Nota: el level por defecto es 2, por lo tanto no se le mostrará)
//*Nota2: para cambiar el level a 1, se tiene k hacer manualmente por phpmyadmin
echo '<form action="subearchivo.php" enctype="multipart/form-data" method="post">
<table class="file_slot" cellpadding="0" cellspacing="3" width="360">
<tbody>
<tr>
<td width="1%" align="right"><b>Filename:</b></td>
<td nowrap="nowrap">
<input name="file_name" type="file" id="name" /></td>
</tr>
<tr>
<td align="right" nowrap="nowrap"><b>Uploaded by:</b></td>
<td><label for="select"></label>
<select name="upload_by" id="upload_by">
<option value="Unrelease" selected="selected">Quien Eres?</option>
<option value="DannyGraph">DannyGraph</option>
<option value="Shelson">Shelson</option>
<option value="ChinoFilms">Chino</option>
</select></td>
</tr>
<tr>
<td align="right" valign="top"><b>Description:</b></td>
<td><input type="text" name="descripcion" id="descripcion" /></td>
</tr>
<tr>
<td align="right" valign="top"><b>Fecha:</b></td>
<td><input name="upload_date_file" type="text" id="upload_date_file" value="<?php echo date ( "d-m-Y H:i:s" , time () ); ?>" /></td>
</tr>
<tr>
<td align="right"><b>Datos:</b></td>
<td><input type="text" name="cadenatexto" id="cadenatexto" /></td>
</tr>
<tr>
<td align="center" colspan="2"><script type="text/javascript" src="./ver.php_files/swfobject.js"></script>
<input type="submit" name="button" id="button" value="Subir Archivo" /></div></td></tr></tbody></table></form>';
}
echo '<br><a href=MODULO/logout.php>Salir</a>'; //link para deslogearse, iría a logout.php
}
?>