call funcution when clicking submit

I’ve built a WordPress plugin, this plugin has a form in front-end using a shortcode
I need the submit button to do two things, first to send the entries to the database which I did it successfully. The second thing is to build a URL from entries and run it