Reply to Re: sending an array in an hidden field

Your name:

Reply:


Posted by Steve on 09/28/54 11:44

"nescio" <nescio@nescio.nl> wrote in
news:43c24cff$0$9361$19deed1b@news.inter.NL.net:

> hello,
>
> i have an array and i want to sent it in an hidden field with other
> information in a form;
>
> when i try to look in the array, which i have sent with the hidden
> field , with
> 'foreach' i always get an
> error mesage: Warning: Invalid argument supplied for foreach()
>
> my question is: is it possible to sent an array in an hidden field and
> use it on another page?
>
> thanks,
>
>

I may be wrong here but when passing an array as a form element you need to
do the following

instead of

echo 'input type="hidden" name="foo" value="' . $bar . '">';

use this

echo 'input type="hidden" name="foo[]" value="' . $bar . '">';


-------------
Get FREE newsgroup access from http://www.cheap56k.com

[Back to original 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

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