Ver Mensaje Individual
  #8 (permalink)  
Antiguo 14/05/2011, 11:13
Avatar de s00rk
s00rk
 
Fecha de Ingreso: octubre-2010
Ubicación: Mexico
Mensajes: 238
Antigüedad: 13 años, 6 meses
Puntos: 48
Respuesta: No se como coger datos

Yo pues haria algo asi:
Código PHP:
<?php
$id 
$_SESSION["id_usuario"];
$q mysql_query("SELECT * from temas where id_usuario='".$id."'");
echo 
"<td>";
if(!
mysql_num_rows($q))
{
    echo 
"No has creado ningun tema";
}else{
    while(
$r mysql_fetch_object($q))
    {
        
?>
        - <a href="vertema.php?id=<?=$r->id_tema?>" style="color:#FF0"><?=$r->titulotema?></a><br />
        <?
    
}
}
echo 
"</td></tr>";
?>