开发者

Post have has duplicated properties

Problem is: I have form with radio buttons in it. One radio button checked as default. When I check another one and push apply button i have $_POST with duplicated properties but different values: country: 55

country: 72

second one is previous checked value. Expected only one propertie. I can't understand why this happens.

<div id="countries">
    <table>
    <tr>
        <td>
            <input name="country" type="radio" value="14" id="country_14" checked="checked"/>&nbsp;<label for="country_14">Austria</label>
        </td>
        <td>
            <input name="country" type="radio" value="117" id="country_117"/>&nbsp;<label for="country_117">Latvia</label>
        </td>
    </tr>
    <tr>
        <td>
            <input name="country" type="radio" value="21" id="country_21"/>&nbsp;<label for="country_21">Belgium</label>
        </td>
        <td>
            <input name="country" type="radio" value="123" id="country_123"/>&nbsp;<label for="country_123">Lithuania</label>
        </td>
    </tr>
    <tr>
        <td nowrap>
            <input name="country" type="radio" value="33" id="country_33"/>&nbsp;<label for="country_33">Bulgaria</label>
        </td>
        <td nowrap>
            <input na开发者_如何学Pythonme="country" type="radio" value="124" id="country_124"/>&nbsp;<label for="country_124">Luxembourg</label>
        </td>
    </tr>
    </table>
</div>


probably the POST was an array POST, like:

<form action="." method="POST">
 <input value="val1" name="name[0]">
 <input value="val2" name="name[1]">
 <input type="sumbit" value="Submit">
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜