Re: Dynamic variables (with method=post)

From: Date: Thu, 20 Mar 2003 17:17:33 +0000
Subject: Re: Dynamic variables (with method=post)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-140452@lists.php.net to get a copy of this message
Thanks John, Now it's running right. :) []'s Fabio. "John W. Holmes" <holmes072000@charter.net> escreveu na mensagem news:002b01c2ee8b$f76dd3b0$7c02a8c0@coconut... > > How do i receive dynamic variables with POST ? > > Please, see the code fragment. > > > > $ped_item = mysql_result($result, $j, 0); > > > > <form name=form_$ped_item method=post action=pedido.php> > > <input type=hidden name=upd_item value='$ped_item'> > > <input type=text size=7 maxlength=7 value=$ped_qtde > > name=quantidade$ped_item> > > </form> > > > > > > "upd_item" was usually received. > > How do i receive "quantidade$ped_item" ? > > > > I have tried: > > > > $p1 = $_POST['upd_item']; // this is OK ! > > $p2 = $_POST['quantidade$upd_item']; // this doesn't work ! > > I guess it would be > > $p2 = $_POST['quantidade'.$p1]; > > if I'm reading correctly... > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > >

« previous php.general (#140452) next »