If the codes exactly the same then they'll do exactly the same thing. You need to have some method of distinguishing which form to access. If the operations' identical then you need to, perhaps, make the submission a function call so you can pass in a reference to either form.
The way you distinguish forms is to give them ID's and then you can submit them using that difference. You can see more about forms here: HTML Forms