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"/> <label for="country_14">Austria</label>
</td>
<td>
<input name="country" type="radio" value="117" id="country_117"/> <label for="country_117">Latvia</label>
</td>
</tr>
<tr>
<td>
<input name="country" type="radio" value="21" id="country_21"/> <label for="country_21">Belgium</label>
</td>
<td>
<input name="country" type="radio" value="123" id="country_123"/> <label for="country_123">Lithuania</label>
</td>
</tr>
<tr>
<td nowrap>
<input name="country" type="radio" value="33" id="country_33"/> <label for="country_33">Bulgaria</label>
</td>
<td nowrap>
<input na开发者_如何学Pythonme="country" type="radio" value="124" id="country_124"/> <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>
精彩评论