2011-02-04 61 views
0

问题是:我有它的单选按钮的形式。一个单选按钮被选中为默认值。当我检查另一个,并按应用按钮我有$ _POST具有重复的属性,但不同的值: country: 55
country: 72
第二个是以前的检查值。预计只有一个特性。 我不明白为什么会发生这种情况。帖子有重复的属性

<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 name="country" type="radio" value="124" id="country_124"/>&nbsp;<label for="country_124">Luxembourg</label> 
     </td> 
    </tr> 
    </table> 
</div> 
+2

你可以发布你的HTML为我们好吗? – 2011-02-04 09:06:01

回答

0

可能是POST是一个数组POST,如:

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