forms – How to properly add a custom submenu to the user’s admin menu

Firstly, I’m new. Assume that I know nothing!

I’m writing a small plugin. Ultimately the goal of the plugin is to allow users to choose things that interest them from a few custom taxonomies, and then display custom post types that have items from these taxonomies appended to them. I have created the custom post type and some custom taxonomies, which I have populated with items. I have modified The Loop so that only posts of my custom type that match (currently hardcoded) taxonomies are displayed to users when they hit the front page. This works well.

I am now working on letting users choose which items from each custom taxonomy they are interested in.

I’ve created a submenu on the user’s admin page, populated a table to show their existing choices and then pulled each item from each custom taxonomy into a form. There is a button at the bottom of the form. The intention is for the user to make their choices, then click the button to update their choices. I’d intended to use the update_user_meta function to store this information in the user meta table, and this works fine when I hardcode some choices, but I can’t fathom how to make the button on the form fire.

I think I’m on the right lines using the usermeta table and functions, and I can read to and append usermeta fine, but I can’t get the button to work! I think I need to register an action to fire when the button is clicked but I don’t know how to do that. It’s quite frustrating because I feel like I’ve done the hard work but am letting myself down by not grasping some fundamental concept!

Could somebody please explain to me how this button should work?