Reply to Re: Foreach element in $_POST?

Your name:

Reply:


Posted by Carl on 12/06/05 22:48

IWP506@gmail.com wrote:
> Hey
>
> Is there a way to go through each element in the $_POST supervariable?
>
> I'm making a page with dynamic forms, so I don't know for sure how many
> $_POST variables there will be (the number of textboxes, radio buttons,
> etc changes).
>
> How can I either count them or do a foreach loop to do this?
>
> Thanks
>
> iwp506@gmail.com
>

iwp506,

Easy, just treat $_POST as an array and use foreach.
http://www.php.net/manual/en/control-structures.foreach.php

Don't forget to make the post values safe before using them if they were
input by the users...

Carl.

[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

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