|
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.
Navigation:
[Reply to this message]
|