Each button added to the page needs to have its own opening and closing form field. This tells the browser that each form is separate, and not part of the same one.
The following correct example generated two separate buy buttons:
<form action="https://www.2checkout.com/
checkout
/purchase" method="post"> <input type="hidden" name="sid" value="XXXXXX" /> <input type="hidden" name="product_id" value="10" /> <input type="text" name="quantity" size="5" value="1" /> <input type="submit" name="submit" value="Buy from 2CO" /> </form>
<form action="https://www.2checkout.com/checkout
/purchase" method="post"> <input type="hidden" name="sid" value="XXXXXX" /> <input type="hidden" name="product_id" value="10" /> <input type="text" name="quantity" size="5" value="1" /> <input type="submit" name="submit" value="Buy from 2CO" /> </form>
** Notice that there are two opening tags ( <form> ) and two closing tags ( </form> ).
Another possibility, if you are using an HTML editor, is the editor may be adding extra numbers to the parameters, thinking each identical one is part of the same form, and not a separate form. Look at the parameters in the forms, and make sure there are not extra numbers added to it.
Incorrect Example:
<form action="https://www.2checkout.com/
checkout
/purchase" method="post"> <input type="hidden" name="sid1" value="XXXXXX" /> <input type="hidden" name="product_id" value="10" /> <input type="text" name="quantity" size="5" value="1" /> <input type="submit" name="submit" value="Buy from 2CO" /> </form>
** Notice that the in second line from the name=”sid1″, this should always be name=”sid”
Important Note: When you are testing parameters, please be certain to clear the cookies in your browser between tests to ensure the changes you have made are applied. For more information on clearing the cookies please click here.