Php variable in form action

I’m trying to have my submit button send the user to a different page, and the only way I know how to do that is by putting the page url in the forms “action” attribute. The problem is that I need to pass a variable to the page they are going to such as:

seeall.php?day=0

How do I set the variable in the action attribute from the same page so that the day value is passed when they submit? Is there a way to run a function on the same page and have php to send them to a new page when they hit submit?

Thanks