Well in the form definition tag leave the action blank and be sure to include a name for it:
<form action="" name="f">
Then, you need to use some javascript:
function sub(form, action)
{
form.action=action;
}
And then the two submit buttons:
<input type="submit" value="Page One!" onClick="javascript:sub(f, 'page1.php')">
<input type="submit" value="Page Two!" onClick="javascript:sub(f, 'page2.php')">