RE: Multiple checkboxes and multiple textboxes [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey guys,
Thank you everyone who replied.

The below solution from Warren worked out great for me with a little
modification for my specific needs.

Cheers,
Ryan

> Hard code the array occurrence number in the checkbox and textbox names;
> <input type=checkbox name=url[1] value='http://somesite'
> checked> <a href='http://somesite' target=a>somesite</a>
> <br><input type=text name=txt[1] size=75 value='some desc'>

> The form will only return the checkboxes that are checked and the
> textboxes
>
> will return all textboxes (that is the nature of these input controls
> with
>
> most browsers);
>
>
>
> $urls = $_POST["url"];
>
> $temptexts = $_POST["txt"];
>
> Foreach($urls as $no => $val) {
>
> $txt[$no] = $temptxts[$no];
>
> }
>
>
>
> Now $txt contains only matching text fields.
>
>
>
> Hope this helps,
>
>
>
> Warren Vail
>
>
>
>
>
> > -----Original Message-----
>
> > From: Ryan A [mailto:ryan@xxxxxxxxxxxx]
>
> > Sent: Friday, November 05, 2004 11:28 AM
>
> > To: php-general@xxxxxxxxxxxxx
>
> > Subject:  Multiple checkboxes and multiple textboxes
>
> >
>
> >
>
> > Hi,
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux