I want to run a PHP function with an HTML button click.
I can call a PHP script this way:
Name
You need to do this on your end. Process the post and call the function in the action.php page on your own. You can also create a separate php page to call a function defined in action.php.