Re: [PHP] populate form input option dropdown box from existingdata

[email protected] (tedd)
Newsgroups php.general
Message-ID <p06240800c65d739ae4b2@[192.168.1.102]>
At 10:42 AM -0500 6/16/09, Shawn McKenzie wrote:
>He has a multiple select, so the select has to be an array or you just
>get one value even if more than one was selected (you just get the last
>one).

Okay, it's not that much different than using check-boxes -- here's 
the solution for that:

http://www.webbytedd.com/bbb/check-box-form/index.php

and here's the select solution:

http://www.webbytedd.com/bbb/select-box-form/index.php

The point is to use name="option[]" (i.e., name the array) and allow 
the browser to populate the POST array. Then on the php side of 
things, simply pull out the data from the POST array via the array's 
name.

You can see how this is done via the above links.

Cheers,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.