Thats not how forms work.
A form can either post to itself, or post to another page.
If you want to post to itself then you put the actions on the same page triggered by the submit button. If you post to another page then thats where the code needs to exist.
If you want form to post to itself, and then perform another action then you will need to store the contents of the form in session variables or in a database to retrieve them on the next page.
Cheers
Ian