Php jquery:将项目从一个列表移动到另一个列表,并从该列表中收集多个数据

Php jquery:将项目从一个列表移动到另一个列表,并从该列表中收集多个数据,php,jquery,html,select,Php,Jquery,Html,Select,我的HTML表单中有两个select控件 <form name="frmMultiple" id="frmMultiple" method="get" action="MovingItemsFromList.php"> <table border="0" cellpadding="5" cellspacing="0"> <tr> <th align="left" valign="top">Select:<

我的HTML表单中有两个select控件

    <form name="frmMultiple" id="frmMultiple" method="get" action="MovingItemsFromList.php">
    <table border="0" cellpadding="5" cellspacing="0">
    <tr>
        <th align="left" valign="top">Select:</th>
        <th>&nbsp;</th>
        <th align="left" valign="top">Selected:</th>
    </tr>
    <tr>
        <td align="left" valign="top">
            <select id="cboCountryID" name="cboCountryID" multiple="multiple" style="width:200px;" size="10">
                <option value="1">Afghanistan</option>
                <option value="3">America</option>
                <option value="3">Albania</option>
                <option value="4">Algeria</option>
                <option value="5">American samoa</option>
            </select>
        </td>
        <td align="center" valign="middle">
            <input type="button" id="btnMoveRight" name="btnMoveRight" value=">>" />
            <input type="button" id="btnMoveLeft" name="btnMoveLeft" value="<<" />
        </td>
        <td align="left" valign="top">
            <select id="cboCountryIDSelected" name="cboCountryIDSelected" multiple="multiple" style="width:200px;" size="10">
            </select>
        </td>
    </tr>
    <tr><td colspan="2"><input type="submit" id="btnSubmit" name="btnSubmit" value="Show" /></td></tr>
    </table>
    </form>
问题是,我想使用PHP从第二个选择控件/组合框中收集数据。 如果我在控件名中使用[],它将停止移动数据。
有谁能给我一个解决方案吗?

请确保您只更改名称,而不是将id更改为cbocontryidselected[]


您是在更改id还是名称?我改了名字,效果很好,看看这个JSFIDLE谢谢。。。这是完美的工作…不客气,我添加了一个答案作为参考,请标记为正确的答案
    $(document).ready(function(){
        $('#cboCountryID').dblclick(function(){return !$('#cboCountryID option:selected').appendTo('#cboCountryIDSelected');});
        $('#btnMoveRight').click(function(){return !$('#cboCountryID option:selected').appendTo('#cboCountryIDSelected');});

        $('#cboCountryIDSelected').dblclick(function(){return !$('#cboCountryIDSelected option:selected').appendTo('#cboCountryID');});
        $('#btnMoveLeft').click(function(){return !$('#cboCountryIDSelected option:selected').appendTo('#cboCountryID');});
    });
<select id="cboCountryIDSelected" name="cboCountryIDSelected[]" multiple="multiple" style="width:200px;" size="10"></select>