While WP is a little weak about working with forms in general, there are some loose conventions that can help keep things organized.
For POST forms there is a dedicated wp-admin/admin-post.php
endpoint, which meant for just that and works similarly to better known admin-ajax.php
.
Unless you have good reasons to organize it otherwise I would recommend just to use it for form processing. After you are done you can get back to your page with something like wp_safe_redirect( wp_get_referer() ); die;
.
Related Posts:
- Add a Separator to the Admin Menu?
- Adding a custom admin page
- How to remove entire admin menu?
- This CSS Stuffing Works, But Is This A Good Practice?
- Plugin to remove Admin menu items based on user role?
- Add my own button next to “Screen options” and “Help” in the admin
- Settings API – easiest way of validating checkboxes?
- WordPress Admin back-end – advanced options page?
- How to show custom menu items in the WordPress android app?
- Remove ability to access certain admin menus
- Appearance->Editor not visible
- How To View Site from Non-Logged-In User’s Perspective
- Custom WP_List_Table displays blank rows
- How do I set up a webhook?
- Admin pages have no content
- WordPress Left Hand Side Admin Menu Always Collapsed
- Reorder plugin items in the admin menu
- Re-ordering Admin Submenu Sections
- Reference external file as a function
- Add number new posts (post_status = pending) to administration menu [duplicate]
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- wp_dropdown_pages() in theme admin page
- Change the Default Pages Menu View in wp-admin
- How to change admin menu position of “Media”?
- Change top level menu item to point to custom submenu item
- Associating custom submenu item with post type of top level menu item
- Admin doesn’t have sufficient permissions to plugin’s page
- Remove Admin sidebar link
- Single category’s posts list in admin menu
- How can I show the contents of only a few users
- Settings API not saving values to database
- Dashboard menu missing
- Admin option sidebar count
- WordPress Remove Submenus
- page not updating with database
- Why am I timing out when using the Menu Editor?
- 500 internal server error on wp-admin only
- Problem with Settings API: changes are not saved after submit
- Add Custom Script in Other Plugin’s Options page
- Accessing variable from admin panel?
- Output the admin menu_position for each item
- WordPress custom admin functions security
- avoiding the display of certain categories to certain user roles at content entry time
- How can I add a menu item to the admin area?
- Backend Checkboxes working – but not visual?
- WordPress Admin Menu Order for ‘admin.php’ pages
- Show global Message in User Profiles with admin only Input field in WordPress Backend
- [Multisite]How can I update custom blog option?
- Give admin_menu permission to specific users
- Call require_once form admin page with checkbox
- Show all admin menus in a table
- Highlight active Admin Menu when added though add_menu_page
- require/include php file in add_menu()
- Create WordPress Menu Item Without Linking to a Custom Page
- Get Link of Page Selected through a Select Field in Custom Admin Page
- Simple CSS admin pagination
- My code for creating an admin option doesn’t work
- How to change the default url for ‘Posts’ link?
- Unsure how to add simple checkboxes that write to a small table to admin
- Add a link to the Admin menu
- Reference external file as a function
- I don’t have permission to save the theme options I created myself?
- Pull Random Images From Options Page [closed]
- Woo Commerce Settings for Check-out Form [closed]
- Display admin sidebar into custom post pages if logged
- Hide other users’ posts in admin panel
- Editor Styles and Typekit
- WordPress admin stylesheet
- Add separator to admin submenu
- Showing WP_Error message with admin_notice action hook
- Taxonomy/category hierarchy lost when editing posts [closed]
- Setting Login with User Name and Password default option for Jetpack Admin Login
- How to remove “publish metabox” from each post type
- Adding html format on tinymce visual editor
- WordPress ACL (folder + permissions)
- Grabbing the first image attached to a post and use it with the admin columns
- WordPress Brute Force Prevention
- admin_enqueue_scripts not rending JS file correctly
- How to break line / add to ADMIN menu
- Accidentally changed website url
- Private post hidden from Admin too
- Send admin to a different login than users?
- Having problem creating local instance of wordpress site
- WordPress Plugin Admin Tab
- Unable to access admin web page
- exclude ID on avatar
- Missing content on website. Admins cant sign in
- Plugin option for input box validation
- Is Post-Form Resubmission somehow prevented in WordPress 4.2.2?
- How to sort post_meta in edit.php?
- Scripts are not called until I login from wordpress backend
- Link to all posts page?
- If the only thing I use MySQL for is WordPress, do I need MySQL’s timezone tables?
- Hiding an added admin page menu using css
- plugin to upload to youtube via wordpress [closed]
- My Account Lost Administrator permission
- WordPress admin panel is blank
- deploying a standard build of wordpress in WHM/cPanel
- What Role to assign remote site developer?