You will have to disect my code. This is from my listing in the products.tpl.
Code:
<tr valign="top">
<td><form name=orderform_{%product.index%} method=post action="cart.php?mode=add">
<a href="javascript: document.orderform_{%product.index%}.submit()">
{include file="buttons/add_to_cart1.tpl"}</a>
<input type=hidden name=amount value=1>
<input type=hidden name=mode value=add>
<input type=hidden name=productid value="{$products[product].productid}">
<input type=hidden name=cat value="{$smarty.get.cat}">
<input type=hidden name=page value="{$smarty.get.page}">
</form></td></tr>