Ver Mensaje Individual
  #8 (permalink)  
Antiguo 23/01/2009, 15:35
abigor66
 
Fecha de Ingreso: mayo-2008
Mensajes: 489
Antigüedad: 16 años
Puntos: 8
Respuesta: duda con Jump Menu

Exacto, debes utilizar un while para hacer lo que quieres.

en ese caso seria:

Código php:
Ver original
  1. <?php
  2.    include("conn.php");
  3.    $link=Conectarse();
  4.    $id=$_POST['mat_material'];
  5. ?>
  6.  
  7.  
  8. <form name="form1" action="" method="post">
  9.   <table width="200" border="1">
  10.     <tr>
  11.       <td><select name="mat_material"  onChange="this.form.submit()">
  12.         <option value="Acero">Acero</option>
  13.         <option value="Barra">Barra</option>
  14.             </select></td>
  15.     </tr>
  16.     <tr>
  17.       <td><label>
  18. <?php
  19.  $result=mysql_query("SELECT * FROM material WHERE mat_material='$id'",$link);
  20.   while($row = mysql_fetch_array($result)) {
  21.    echo $row['mat_material'].' - '.$row['cod_material'].'<br />';
  22.   }
  23.   mysql_free_result($result);
  24. ?>
  25.       </label></td>
  26.     </tr>
  27.   </table>
  28. </form>

Suerte