Tutorial :Extracting value of non-selected options from html <select> using PHP



Question:

I have an HTML that uses the following script as described in the first example here: http://www.mattkruse.com/javascript/selectbox/

I want to use PHP to extract the options that are in the right select box. How do I do that if they are not actually 'selected'?

Thanks,


Solution:1

I would just preselect them all before you submit the form. You can use a simple javascript function to preselect all the options in the list. You will need to make sure that the list supports multiple selected options.

Another way would be to just submit them all in a hidden form tag delimited somehow.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »