You are here: Re: [PHP] Variable $_POST vars? « PHP « IT news, forums, messages
Re: [PHP] Variable $_POST vars?

Posted by Curt Zirzow on 12/11/05 19:38

On Sun, Dec 11, 2005 at 12:10:22AM -0600, The.Rock wrote:
> Stephen,
>
> I'm using a template and so:
> <input name="item{number}" size=60 class="formdata" value="{item}">
> becomes:
> <input name="item1" size=60 class="formdata" value="{item}">
>
> ....and so on.

You seemed to miss the point Stephen was suggesting, to use your
template syntax:

<input name="items[{number}]" size=60 class="formdata" value="{item}">

Then in your php code:

$item = $_POST['items'];
foreach($items as $i => $value) {
echo "$i: $value<br>";
}

Curt.
--
cat .signature: No such file or directory

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация