WordPress Plugin Setting’s POST

if you are using the Settings API then you can use your own php inside the $sanitize_callback of your register_setting and return the value you want to save after doing your “more complex handling”.