Post whole ListBox - PHP

I want to POST the multiple selection listbox with all the values in it. The values in the listbox are NOT selected. They are coming from a different listbox.

Code in Form



<select name="SecondList]" size="10" multiple id="SecondList" style="width:250"></select>


I am handling in PHP. This code gives me whole array if everything is selected in the list. But I want the whole list even if nothing is selected.



$myflex->set_oG($_POST'SecondList']);


Any help will be appreciated.

Thanks.

Re: Post whole ListBox - PHP

Ok I been able to find one solution to it.

Using Javascript I should select the whole Listbox before I submit and call this function on 'onClick' of 'submit'.



<input name="btnProject" type="submit" value="Submit New Project" onClick="selectAll(this.form.SecondList);">


This is the function to select the whole listbox.



function selectAll(box) {
    for (var i = 0; i < box.length; i++) {
        box*.selected = true;
    }
}


Re: Post whole ListBox - PHP

***What on earth ARE you talking about :vivo:


Re: Post whole ListBox - PHP

I need to improve my PHP skills :hinna:

Re: Post whole ListBox - PHP

Sheyn, I think he needs some magic syn-dust