I'm wondering how you control what happens when you click the "save changes" button in the settings page. I'm trying to setup a simple plugin so that I can select students and then assign them to a team, like so:

How do I modify what happens when the save changes button is pressed so that new database entries are created when I click it? If this isn't possible, can someone point me in the direction of a simple way to create this desired effect?
Thanks, Sean.