NYCPHP Meetup

NYPHP.org

[nycphp-talk] Newbie question - multi-select list box

Jeff jsiegel1 at optonline.net
Fri May 2 10:07:05 EDT 2003


Correct. However, if the form posts to itself and I want to retain on
the form the selection(s) made by the user...how would I do that?

Jeff

-----Original Message-----
From: Brent Baisley [mailto:brent at landover.com] 
Sent: Friday, May 02, 2003 8:38 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Newbie question - multi-select list box


Since a multi-select can contain multiple values, you need to use a 
variable that can hold multiple values. If you add brakcets [] to your 
field name for the multi-select, then the values will be contained in 
an array by that name.

<select name="varName[]" multiple size=5>

On Friday, May 2, 2003, at 08:34 AM, Jeff wrote:

> I have a multi-select list on a form that posts to itself. However, 
> while other items, such as text boxes retain their values (I'm using 
> something like <?php echo $_POST['DL_sAddr2'] ?> ) I'm scratchin' my 
> head on how to do the same with the multi-select list.
>
-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



--- Unsubscribe at http://nyphp.org/list/ ---






More information about the talk mailing list