You must define the checkbox to store array in order to get all the selected values. Change your input name from “data-ids” to “data-ids[]”.
<input name="data_ids[]" value="<?php echo get_the_ID(); ?>" <?= isset($results[get_the_ID()]->data_id) == get_the_ID() ? 'checked' : '' ?> type="checkbox" />
Related Posts:
- Simple form that saves to database
- Retrieving a Value from a wp-database
- WP plugins for building a database?
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- Storing Form data in a different database
- Include plugin form in the home page
- Create user assessment and use results in sql query
- Creating fields in the database
- Allow users to enter and edit data in one-to-many configuration
- Form with response button after on table after submission
- WP Plugins – Use includes to display page content
- Multiple instance of data in plugin custom database table on plugin activation
- WordPress and a secondary database?
- WordPress plugin creating database in localhost but not on real host
- Why this function not working for install database on plugin activation
- How to fetch form data and show it to my page?
- Plugin to create forms using HTML [closed]
- Submit custom form from post content and execute in plugin
- How to allow user to select User ID in Formidable Pro form? [closed]
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- Char limit on custom blog-post form? [closed]
- “Master” WordPress Multisite – Database Sync
- Better ads plugin has 500.000 entries in wp_postmeta
- How to create multiple database tables on plugin activation?
- Can I create a table on my DB without creating a plugin?
- WordPress : Explain Plugins & Theme string value in database
- Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?
- Does deleting a Plugin via the WordPress admin ‘completely’ remove the code?
- Creating a CSV with PHP inside the plugin directory
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Plugins in WP_Options but not Active
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Is there a way to embed a Google Docs form in a page without using plugins?
- Detailed form plugin, with ability to export to excel etc. OR edit PDF live? [closed]
- easy steps to make front end form without plugin
- How do i edit the plugin files in DataBase via phpMyAdmin?
- WordPress as a data-store?
- How to insert and call new data in wordpress website database through a plugin
- Gathering and logging data from a plugin: how to do it without race conditions?
- Form that generates an ID for the customer
- How to pass the API key to the client from the database? [closed]
- WPDB: Update table
- Issue running db create table query from static method
- Problem of encoding characters (apostrophes) in my posts publications
- Separate database for a wordpress plugin
- Is there a rule for wordpress plugins developers to not do any database changes upon update?
- Submit Form data to another page via Ajax (WordPress Way)
- How to keep variable `$post` to using in another file
- dbDelta not adding additional columns in plugin database update
- Editing a text file from plugin menu
- Updating options into the wp database performance
- Ajax Plugin Not Echoing Response
- Making my plugin create a page?
- Plugin that will output submitted form data for user? [closed]
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- Ajax save data to database on document ready, no data being saved
- Add some fileds to the wp_posts table
- How to edit a published post?
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- Best/Correct way to add an option to a category
- Plugin has added weird data in wp_options, set to autoload
- Always get creating a new table with foreign key
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- How to do database for download stats?
- What is the WordPress approach to custom data?
- How to create plugin/ page that reads from database
- How retreive saved data from gravity forms in my template?
- DB Query not working in Plugin
- Assign all Post in Wp to a specific Category
- Creating a form and displaying entry data as a table
- External wpdb connections in different plugins on single page
- How can ι create my own (custom) WordPress table/list?
- Gravity Forms returns to odd position
- WordPress Multi-Step Product Search
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Where do plugin variables live in the db?
- Sell access to form [closed]
- WordPress plugin boilerplate table create
- File Uploader – Upload without adding to Media Library
- How to relate 3 wordpress components with each other (Create database relationships)
- Creating a search form and displaying results
- Custom form not showing in correct place on page
- add_meta_box creating default form field types
- WordPress plugin: efficient way to store large data
- How can I store data from custom fields to custom tables?
- Form Plugin for Api Requests which is used via Shortcode
- How to redirect to a page after the form is submitted
- Call another page in forms
- Echo out element to another page.
- Plugin: connect to external database without showing password
- How to access the WordPress DB from a plugin file
- How to Use the Filter “sidebar_login_widget_form_args”
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Select Form Element Not Saving from Plugin Options
- Is it save to replace with in WordPress search form
- Contact Form 7 Plugin emails not being received by some accounts
- Contact Form 7 “non-selectable” options in a drop down [closed]
- Is this plugin safe to run?
- Integrating Custom Database with WordPress
- Using AJAX to run SQL statement and populate dropdown