The problem part is this line:
<form method="post" action="options.php">
This sends your form to wp-admin/options.php (and I guess you’re not sending the form from this URL). Leave the action value empty like this:
<form method="post" action="">
And your form will send itself to the same page from which it was sent. Then you can save the settings accessing $_POST variable before outputing
<form method="post" action="options.php">...
Hope this helps…
PS: you should also consider using wordpress nonces. Eg. https://codex.wordpress.org/Function_Reference/wp_nonce_field
Related Posts:
- wp-admin pages return ERR_EMPTY_RESPONSE
- Reorder custom submenu item
- WordPress custom permalinks not working on OS X localhost
- What is an “Options Framework” for WordPress
- WordPress address URL keeps dropping the www
- using wp_sprintf at wordpress option page,
- How to change user admin_color with WP CLI?
- Hide admin menu on update_option
- Custom plugin admin page issues
- Change admin defaults for reading settings
- unsuccessful attempt to change domains- wordpress re-routing to old domain
- Form input values are empty after submit
- Admin page changes the $_POST data
- Some fields in Settings API form are saving, others are not
- How to Fix WordPress Not Saving Settings?
- Options site set empty fields after submitting
- I am not able to enable jQuery in theme settings
- Cannot Update wp DB – Get 500 Error
- Creating your own options-general.php page
- adding the category to the admin column for a custom post type?
- Change page title in admin area
- How to filter by post-format in admin?
- how do I force a single column layout in screen layout
- Make fonts.com font work in TinyMCE (iframe referrer issue)
- How to remove the site health dashboard widget?
- Securing wp-admin folder – Purpose? Importance?
- How to Display Post Excerpts in Admin by Default?
- Admin account only shows Profile and Dashboard with no activity
- Opening specific posts on WP takes lot of time and freezes the editor
- Adding body class to login page?
- Edit a WordPress site without the username and password?
- How to load a CSS file into WordPress admin area using Child Theme? [closed]
- Getting “Cannot modify header information – headers already sent” error, but only on backend
- Why I can’t change the permalink of this page?
- How can I remove the new stats message? [closed]
- Cookie value cannot be read until I’ve logged into the WP admin
- How to inhibit dashboard and profile management access to normal users?
- What corrections does this code need?
- Why can’t I exclude private posts from this query?
- Cannot Access Admin Area After Migration
- Get which template being in use within WordPress-admin
- special characters after saving draft interpreted as �
- Allow administrators to pick post author on custom post type edit screen
- /wp-admin/ works but website doesn’t load
- How can I use a variable to include a linked image?
- Add css code in admin_enqueue_scripts
- Add custom list menu on Posts page in admin panel
- Does it matter if two people are using the same WordPress admin account?
- Add column to pages table
- Use Password Protected Form without the use of wp-login.php
- redirect to a dedicated sign in page
- My email address is displaying an email which does not work. What do i do?
- Too many redirects after added SSL redirect on port 80 virtual host
- Register page in admin area
- Downgrade admin account by mistake
- Removing Dashboard Menu Items Through The Database
- “WordPress installations is currently out of date” problem with difficult situation [closed]
- Making Comments, a sub_menu in admin menu
- Link blogname and blogdescription to the Options Framework
- Customising Word press Admin – Add Post Page functionality to another similar page
- How to add ‘Insert HTML Table’ button to TinyMCE in admin?
- How to allow WordPress updates to only one specific administrator?
- How can I remove commas when adding tags?
- Displaying Title in Title Tag on Edit page?
- How to add custom CSS and JavaScript file for wp- admin dashboard (backend)
- GoDaddy hosting wp-admin problem
- How can I remove unwanted word on my WP site?
- How to take the help button and link off the dashboard
- issue with wordpress [wp-admin] redirects, when using kubernetes ingress hosting two wordpress websites using path
- Toggle between block ‘edit content’ and ‘select’ not properly working in WordPress Admin
- WordPress Admin extremely slow when other admin logged in
- Can’t acces login on new site
- WordPress Admin Panel Left Sidebar No showing on Post create page
- WordPress Migration Post Problems
- After changing Site http to https, can’t access wp login page with a digitalocean hosting
- Can’t access WP-Admin via HTTPS
- Strange wp-admin problem for all users/adminstrators except the original one?
- adding existing menu page on new customer user role
- stop customize.php redirect to login page if admin is not logged in
- Random authentication failures on a load balanced WP setup
- Can I get programmatic access to wp-admin?
- Strange URLs admin area bug
- remove_query_arg on options.php
- wp.svgPainter cannot init error, causing issues with admin panel
- mysql_escape_string PROBLEM
- Cannot access my wordpress website
- Organising and display thousands of photos in media library
- Custom comment action
- Get URL of current featured image with JS in edit post view
- get_current_screen – ‘Trying to get property of non-object’ error
- Block tools menu in wp-admin?
- is_admin() triggers error
- WordPress Admin: open popup window on a custom button
- Modify admin panel tab position
- not able to add thumbnail custom field in dropdown
- No wp-admin, wp-config, or .htaccess folder/file
- WordPress blog fails to open
- wordpress admin is broken [closed]
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box
- Cannot Access wp-admin