The best way would be to use the built-in Options API to add info to the wp_options table.
To add the option:
http://codex.wordpress.org/Function_Reference/add_option
To read the option value:
http://codex.wordpress.org/Function_Reference/get_option
Related Posts:
- Strange issue saving custom field data for a WooCommerce order
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Can I log the searches that are returning 404 in the DB?
- How can I add an image upload field directly to a custom write panel?
- Post meta vs separate database tables
- Is it mandatory to use $wpdb->prefix in custom tables
- Update Option Stored in Multi-Dimensional Array
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- How to validate custom fields in custom post type?
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- Using a database view = evil incarnate?
- Writing a plugin that notify my friends of new post that mentions(@) them
- WordPress and multithreading
- Creating custom field with drop down on new post page
- What is the correct way for plugins to create tables with special charset/collation considerations?
- Save metabox with multiple checkbox array
- How is the data stored in the database?
- Actions or filters fired when data is saved in a custom table
- Retrieving custom fields with $wpdb->get_results
- Utilize TinyMCE hyperlink chooser outside of TinyMCE
- Sample — test — data for large WordPress install
- Custom Plugin Database relations
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- Using posts and postmeta table to store custom Address Book Plugin data
- How to store data for posts/pages built with drag-n-drop builder?
- Database for development
- Is there a naming convention for database tables created by a plugin?
- Saving data from block editor to the database
- Best choice of options/settings framework for plugin/theme development
- Ordering posts by metadata
- Creating table with plugin is not working
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- Update/insert only a column of database table
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- Subscribe to author?
- Adding set of custom fields to WordPress Post in Dashboard
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- Using WPDB to output raw XML fails because of wp-blog-header.php
- Saving value of a selection option in comment form as comment meta
- Woocommerce – Convert Delivery method into a custom field
- Form doesnt save to database
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- How to get Metabox custom field to show checked if value is updated using post meta query?
- How do I update a field of a meta box?
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Input value from metabox is not found in $_POST after post save
- Run Shortcode of post’s custom field in functions.php / Plugin
- Plugin Development for registered users
- Custom code for WordPress dynamic menu
- Optimising a big WordPress site
- wpdb->prepare and mysql UPDATE – how is it done?
- dbDelta SQL Query Not Working
- dbDelta not installing database
- Plugin: database creation
- Adding columns to core tables
- Delist entries in the_loop
- Show dynamic list of products from custom api of another database under same host
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- How can I add a simple custom field to my plugin?
- Ajax is not working in a loop
- Make Database query only when option is updated
- Can we intercept user_login and user_pass from a wp_login_form?
- How best to handle database version dependence (from $wp_db_version)
- WP: Search and replace in DB programmatically
- Using AND and bracket grouping in SQL not working
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- per blog metadata for plugin
- How to format custom fields when editing an attachment?
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- How do I debug an error that a plugin is causing?
- Save temporary registration data
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- Update plugin settings option_name for big plugin update
- $wpdb->update Issue
- dbdelta failing with error: “WordPress database error Table ‘wp_2_myPlugin’ already exists
- Customise Grouped Product display in Woocommerce with custom column
- Why User_login key doesn’t work with wp_update_user()
- WP_Query not ordering correctly
- Adding customs fields on each product on the cart
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Save in my custom admin page and redirect to the saved object
- Relational / Associate tables using native WordPress functionality
- WordPress doesn’t create table on plugin activation
- Insert Data into Database
- Update database record in plugin
- Displaying Custom Post Meta
- Why Worpdress doesn’t create table in database?
- Form and database, plugin development
- How to filter get_adjacent_post()?
- I want to display the content of a text field only if it has been entered
- How can I get a plugin to hook ‘dbdelta_queries’ — a filter used during version update?
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- Create Unique and Customized User ID for Website Members in WordPress
- How to create a database table in WordPress using PHP
- Programmatically creating posts based on external JSON feed (asynchronously)
- Making a user platform reachable by a qr code on a pin-back-button [closed]
- multiple record insert creating many duplicate records