Submit form using admin_post hook

In the form, add the following code. Take a closer look at the form action and action hidden field.

In the functions.php file