2011-02-04 60 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>