How can I insert a record into a custom table from my custom form in my custom admin page?
Use the admin-post action hook to intercept POST requests and process forms. The admin_url() function can be used to output the correct URL, and use wp_redirect() to redirect back to your plugin page after processing. And do yourself and your users a favor- don’t reinvent wheels and add tables when the native tables and API … Read more