Can you please post the full:
<form name="form1">
<input type="hidden" name="productid" />
<input type="hidden" name="command" />
</form>
I'm not entirely sure I got the whole idea behind, what you had to put where.
Sorry
I don't understand what you are trying to do?