Tema: Ayuda
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 11/04/2007, 18:17
El Patrón.
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años, 1 mes
Puntos: 3
Re: Ayuda

Hola

Bueno, pues necesitas que esos datos esten dentro de un form para ser enviados.

asi

<? $txtNroProductos = 3; ?>
<p><a href="javascript: void(0)" onclick="MM_openBrWindow('popup.php?id=<?php echo $row_RHomeAccents['IDProduct']; ?>','idImage','width=300,height=300')">sdf<?php echo $row_RHomeAccents['ImageProd']; ?></a></p>
<table border="2" align="center" bordercolor="#ECE9D8">
<tr>
<th>Artículo</th>
<th>Descripción</th>
<th>Centro de Costos</th>
<th>Cantidad</th>
<th>Precio</th>
<th>Impuesto</th>
<th>Importe</th>
<th>Total</th>
</tr>
<?
for ($i=1;$i<=$txtNroProductos;$i++)
{?>
<tr>
<td height="22" width="20" bordercolordark="#454560"><form action="mostrar.php" method="post">d<input type="text" size="10" name="txtidArticulo[]">
</td>
<td height="22"><input type="text" name="txtdescArticulo[]">
<input type="submit" name="btnAyuda" value=" ">
<? // echo "<td><a href=\"ayudaDescripCP.php ?descripcion=".$txtdescArticulo[$i]."\">Ayuda</a></td>";
?>
</td>


<td height="22" width="20"><input type="text" size="10" name="txtvccArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtcantArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtprecioArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtimpuestoArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtimporteArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txttotalArticulo[]"></td>

</tr>
<?
}
?>
<tr>
<td height="22" width="20"><input type="submit" value="enviar" />
<input type="hidden" name="txtNroProductos" value="<?=$txtNroProductos?>" />
</td>
</form>
</tr>
</table >

y en este ejemplo como el action apunta a mostrar.php , en dicha pagina iria este codigo

<?

echo "IDArticulo - Descripcion<br>";
for ($i=0;$i<$txtNroProductos;$i++)
{

echo $txtidArticulo[$i]."&nbsp;&nbsp;&nbsp; ".$txtdescArticulo[$i]."<br>";
}
?>

Lo único raro es como te digo, que pongas los campos dentro de un formulario, y que envies en un hidden el txtNroProductos para con ese mostrar los datos en la pagina mostrar php con el ciclo for, bueno, espero te sirva.
__________________
Suerte.
_______________________________
"La vida es el principio de la muerte".