title: PHP: using post when mutliple form fields share same name & id
body: <p>That title probably doesn't mean much but what I have is a form that is generated dynamically. I hooks into a table of products, pulls out there name. I then create a form that displays the product with a checkbox and textbox next to it.</p>
  
  <pre><code>&lt;form id="twitter-feed" name="twitter-feed" action="&lt;?php echo $this-&gt;getUrl('tweet/') ?&gt;index/tweet" method="post"&gt;
  &lt;table&gt;&lt;tr&gt;
  &lt;?php
  
  $model = Mage::getModel("optimise_twitterfeed/twitterfeed");
  
  $products = $model-&gt;getProducts();
  
  foreach ($products as $product){
      echo '&lt;tr&gt;';
          echo '&lt;td&gt;';
              echo '&lt;label for="'. $product .'"&gt;' . $product . '&lt;/label&gt;';
              echo '&lt;br /&gt;&lt;input type="text" class="hashtag" name="tags" id="tags" value="#enter, #product, #hastag"';
          echo '&lt;/td&gt;';
          echo '&lt;td&gt;&lt;input type="checkbox" name="chk" id="'. $product .'"&gt;&lt;/td&gt;';
     echo '&lt;/tr&gt;';
  }
  ?&gt;
  
  &lt;tr&gt;&lt;td colspan="2"&gt;&lt;input type="submit" name="submit" value="tweet"&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>As you can see there are checkboxes and textfields for each record. When I examine the $_POST data from the form it only retains fields for the last record. </p>
  
  <p>Is there a way to pass all this data back to the action?</p>
  
  <p>Cheers,</p>
  
  <p>Jonesy</p>