title: Multiple Forms or Multiple Submits in a Page?
body: <p>I'm creating a page with the products sold in the website. I'd like to include an "add to cart" button near each product, which are listed with markup similar to this:</p>
  
  <pre><code>&lt;h4 class="productHeading"&gt;Product Name 1&lt;/h4&gt;
  &lt;div&gt;
    Extra information on the product 1.
  &lt;/div&gt;
  &lt;h4 class="productHeading"&gt;Product Name 2&lt;/h4&gt;
  &lt;div&gt;
    Extra information on the product 2.
  &lt;/div&gt;
   ...
  </code></pre>
  
  <p>Since the submit inputs will have different names (with the code of the product included), the big question is: should I wrap the entire product list in a form, or should I create one form for each product? In code:</p>
  
  <pre><code>&lt;form method="post" action="process.php"&gt;
    &lt;h4 class="productHeading"&gt;Product Name 1&lt;/h4&gt;
    &lt;div&gt;
      Extra information on the product 1.
      &lt;input type="submit" name="submit1" value="Add to Cart"&gt;
    &lt;/div&gt;
    &lt;h4 class="productHeading"&gt;Product Name 2&lt;/h4&gt;
    &lt;div&gt;
      Extra information on the product 2.
      &lt;input type="submit" name="submit2" value="Add to Cart"&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Or…</p>
  
  <pre><code>&lt;h4 class="productHeading"&gt;Product Name 1&lt;/h4&gt;
  &lt;div&gt;
    Extra information on the product 1.
    &lt;form method="post" action="process.php"&gt;
      &lt;input type="submit" name="submit1" value="Add to Cart"&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  &lt;h4 class="productHeading"&gt;Product Name 2&lt;/h4&gt;
  &lt;div&gt;
    Extra information on the product 2.
    &lt;form method="post" action="process.php"&gt;
      &lt;input type="submit" name="submit2" value="Add to Cart"&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Which one is best practice? Any serious reason not to use one or the other, or am I doing it completely wrong?</p>