RE: [PHP] Question: Simpler loop

2004-10-22 Thread Stuart Felenstein
Yes, I think that will work, as soon as I can figure out where on the page it should go. On error should post to itself, on success it moves to next page. I put the loop on top and am getting an invalid argument for the foreach. Stuart --- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > In which case

RE: [PHP] Question: Simpler loop

2004-10-22 Thread Graham Cossey
Yep, Mike's solution is simpler. It's getting late on Friday and the brain is starting to slow down. (That's my excuse anyway...) [snip] > > > > Is there a simpler way / shorter way to check > > conditions to do this ? > > So, the entry is valid only if all three are non-blank? > > In which ca

RE: [PHP] Question: Simpler loop

2004-10-22 Thread Graham Cossey
Slightly simpler: foreach(...) { $count = 0; if ($skill != '') $count++; if ($skys[$key] != '') $count++; if ($slus[$key] != '') $count++; if $count < 3 echo 'Invalid'; else echo 'Valid'; } Graham > -Original Message- > From: Stuart Felenstein [mailto:[EMA

RE: [PHP] Question: Simpler loop

2004-10-22 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 22 October 2004 15:34, Stuart Felenstein wrote: > I have rows of input fields > Each row contains 3 fields. The user must fill out > the entire row (all 3 fields) for things to

Re: [PHP] Question: Simpler loop

2004-10-22 Thread Marek Kilimajer
Stuart Felenstein wrote: I have rows of input fields Each row contains 3 fields. The user must fill out the entire row (all 3 fields) for things to work right. I want to generate an error in case they have only filled in 1 or 2 of the boxes. Thinking I might use something like this: foreach($ski