Page 1 of 1

for each loops question

Posted: Wed Sep 21, 2005 1:29 pm
by Charles256

Code: Select all

foreach ($_POST as $key=>$value)
and then use variable variables to produce the error variables to be echoed and this page is only called if a certian condition is met which includes the page. so how come everyone doesn't do that? any good reasons? Just curious, this might need to be in the security thread? Not entirely sure but feel free to move me if need be.

Posted: Wed Sep 21, 2005 1:36 pm
by feyd
Charles256 wrote:so how come everyone doesn't do that? any good reasons?
well... different people handle inputs in different ways. Normally, I leave all input data in an array and use a queue-style list to store up any errors, gracefully degrading where possible. It requires a lot of code, but makes the user's life a lot easier when they don't have to remember very specific formats to add data to this or that type..
Charles256 wrote:Just curious, this might need to be in the security thread?
It could be, but I'm willing to let it slide... ;)
Charles256 wrote:Not entirely sure but feel free to move me if need be.
we feel free to move a thread, whether the poster likes it or not :P