Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/08/2011, 07:53
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Mostrar nombre recoger otro valor

Debes seleccionar ambos campos en tu consulta SQL y luego recoger los datos:
SELECT nom, idcategoria FROM categories

Luego en tu while:
Código PHP:
Ver original
  1. while(list($nom, $id) = mysql_fetch_array($result)) {
  2.   echo $id . ' ' . $nom;
  3. }