The submit_button()
function is a wrapper for get_submit_button()
. Now that function has multiple arguments, but the most interesting for your actual problem is the 3rd argument name
. It sets the HTML name
attribute.
<form action="">
<input ... etc.
<button type="submit" name="choice-a">
</form>
Now everytime you process your form with an empty action
attribute, you will point to the current request http://example.com/wp-admin/example.php
. There you will be able to fetch your arguments via the super globals $_POST
or $_REQUEST
(which simplified is mostly a combination of $_GET
and $_POST
).
Then just inspect the array and do whatever you need/want to do.