Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/04/2012, 10:59
jyopi
 
Fecha de Ingreso: enero-2004
Ubicación: Ocotlan
Mensajes: 57
Antigüedad: 20 años, 4 meses
Puntos: 2
Respuesta: select option con diferente opcion

Se me presento ahora un grave problema!! espero me puedan ayudar!!

les paso el codigo completo del formulario

Código HTML:
Ver original
  1. <input type="text" name="cantidad[]" value="Cantidad" size="9" onfocus="this.value=''" style="font-size:12px; color:#666666;" />
  2.  
  3.  
  4.  
  5.                     <select name="descripcion[]" id="descripcion[]"  tabindex="3" onChange="document.getElementById('nCategoria').disabled=this.selectedIndex!=1">
  6.                         <option value=""></option>
  7.                         <option value="cat2">Insertar otro</option><br>
  8.                         <OPTGROUP>
  9.                         <?php
  10.        
  11.         mysql_select_db($database_noticias, $noticias);
  12. $query_productos = "SELECT * FROM notas_productos ORDER BY producto ASC";
  13. $productos = mysql_query($query_productos, $noticias) or die(mysql_error());
  14. $row_productos = mysql_fetch_assoc($productos);
  15. $totalRows_productos = mysql_num_rows($productos);
  16.  
  17. do {  
  18. ?>
  19.          
  20.        
  21.      <option value="<?php echo $row_productos['producto']?>" ><?php echo $row_productos['producto']?></option>
  22.           <?php
  23. } while ($row_productos = mysql_fetch_assoc($productos));
  24. ?>
  25.                     </select>
  26.     $   <input type="text" name="precio[]" value="Precio Unit." size="10" onfocus="this.value=''" style="font-size:11px; font-family:'Trebuchet MS', Arial, 'Times New Roman'; color:#666666;" />
  27.     <br />
  28.          <input type="text" id="nCategoria" name="descripcion[]" tabindex="1" value="" title="Categoria" size="123" disabled="disabled" />
  29.         <span><a href="#" onclick="agregar();">Agregar</a><br /><br />
  30. </span>

el problema viene cuanto quiero insertar otro... lo manda dos veces!!! no se si me doy a entender