There’s a problem with the basic flow.
Just bring the 4th item to the top,
so your new order will be :
- Check if the form input field is set, if so, update table via POST
- Retrieve data from wordpress custom table via get_results() or
get_row()- Parse out data into variables, via $row->XXXX or foreach
($rows as $data)- Display in form
- When submit is clicked refresh file and go to item 1, to retrieve data.
The problem is when the submit button is pressed and page is refreshed, first you retrieve the data from the database without updating the data, so you still get the same data-set since the database isn’t updated yet, then you update the database.
Simply you have to update/inset the database before anything, then you can retrieve the data from the updated database.
Related Posts:
- Creating search form for custom database table
- Get multiple db prefix with $wpdb
- How can I add data to a custom column in the Users section of the wordpress backend?
- Adding a Table to the wordpress database
- Get Value from Column in Plugin Table [closed]
- The function can not create a table on MariaDB server
- Creating custom database table with crud operation
- dbDelta not creating tables with composite keys
- Saving contact form 7 data into custom Table
- How to make wordpress use a non-wordpress users table?
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Custom select query two tables by a meta key
- Custom Database Table and foreach
- WordPress search on a custom table
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- What is my error trying to create a new table in the database?
- Create single{custom}.php with data in table out of wp_posts
- Database custom table issues – incorrect result displayed
- Custom table or form
- How to get value from wp_usermeta table in database?
- When is it OK to create a custom table for a plugin? [duplicate]
- Is there a flowchart for WordPress loading sequence?
- How do register_sidebar() and get_sidebar() work together?
- Is it possible to change the attributes of a registered style or script before it fires?
- how to change “published date” format on edit.php (Posts page)?
- Custom category order with get_categories
- How to change submit button value in comment from “Post Comment” to “Send”
- Pagination Help on Crazy Custom Authors Page
- Getting rid of the #038; when string replacing content
- Querying multiple WordPress custom fields with AND qualifier
- WordPress custom post types breaks permalink on theme reinstall
- Creating a searchable A-Z listing of hundreds of companies/services
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Customize in category page
- Multi-Site Plugin Activated (Not Network-Activated), What Happens?
- Add custom column to Users admin panel with Types user custom fields?
- How do I change the default admin color scheme in MP6
- woocommerce Add custom field set like billing fields
- Adding action to save_post, post needs to be saved twice for function to work
- Calling a php file from a javascript file in wordpress
- 1 bit audio player
- Outputting posts from post id´s in variable
- Auto redirect after session expire, but only for one user
- Order By table field comment_status in WordPress > 4.0
- Theme licensing and permission on changing content [closed]
- Add ‘Creator’ User Meta when adding user
- Auto login after wordpress installation
- Custom title, Bones theme
- Determining What Content Gets Displayed
- Truncating varying lengths of information
- How to get pages id in array in get_pages?
- Access post meta in future_to_publish function
- Javascript Solution Remove Specific Tag but leave the rest in a specific DIV
- How to create a completely private wordpress with multiple membership levels
- Why do posts disappear from admin after upgrading from WP 2.7.1 to 3.0.1?
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to change the category url jusy show /category/%category_id% in wordpress?
- custom meta box for page default template
- Child Theme with multiple css files
- How to host 2 subdomains as lookalike destinations under one master domain?
- “An automated WordPress update has failed to complete – please attempt the update again now”– But there is no .maintenance file
- How do I redirect a post url to a custom url?
- Custom Login Process
- How could I verify whole WP directory before/after working with a freelancer? [closed]
- How to customize
- Modify files without losing customization after updates
- Determine if action was executed in functions
- Extending core class in plugin
- Is it possible to make wordpress LMS
- Hiding Short Description in Shop Page, WooCommerce
- Media Upload not working after hiding some elements from functions.php
- Is it possible to rename a customizer control heading?
- How to add WordPress JS Script Links
- Create Unique ID for user
- Customizing the gallery of the post correctly
- Will WordPress updates remove Gutenberg Additional Classes?
- WP_Query – sort the results by meta value custom attribute wocoomerce
- Multiple header style under meta box
- Show products per page drop down
- When developing WordPress plugin, is it a good idea to create my class object by hooking to existing class constructor?
- Static Page, need Last and Next links at the bottom
- How can I create a Custom Page? (not a page template!!)
- Client viewing before deployment
- How to have different background image based on post category
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- How to use a custom playlist template:
- Run a welcome tour after multisite creation?
- Multisite – Getting Meta query to select from wp_2 tables
- How to compare number with id of post in certain category
- Custom stylesheet not loading
- Ordering a specific post type
- Header image doesn’t show up on page
- How to get name and email value from a custom form and add it to campaign monitor subscriber list?
- Custom Link In WordPress Media “Attachment Details” Upload Screen
- “Static” pages within a theme
- Assign classes to Custom fields
- Custom WordPress SQL Query 4 posts per custom taxonomy
- Prevent posts from being published if the ‘Uncategorized’-category or no category is selected
- Custom Search on media files PDF images pages posts