Re: populate form input option dropdown box from existingdata

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

 



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

--
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