On Tue, 28 May 2002, Morten Nielsen wrote:
> I got a table, which contains a lot of text-boxes. Each textbox has a name:
>
> Text1
> Text2
> Text3
> etc.
>
> Is it possible to check if they are all set using a for-loop?
> I think of something like:
>
> for($i=1;$i<10;$i++)
> {
> if(empty("Text"+$i))
> {
> do something...
> }
> }
The easiest approach would be to name your boxes like this:
<input name="text[1]">
<input name="text[2]">
and so on.
Then you can just loop through the $_REQUEST['text'] array when you're
processing the form.
miguel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php