Though you haven’t mention the process and WP tables to insert textbox values in existing WP table. Either you can used option table or postmeta table for your purpose.
-
For option:
WordPress provides two specification API functions for writing data to the database. One comes in the form of adding information, one comes in the form of updating information.- add_option
- A key – or a unique identifier for the information
- The value of the data to be stored
- add_option
As per your sample form
if ( isset( $_POST['showCat1QuestionValue'] ) && ! empty( $_POST['showCat1QuestionValue'] ) {
add_option( 'cate1', $_POST['showCat1QuestionValue'] );
}
-
update_option
- Add the option if it doesn’t already exists
- Overwrite the existing value if it does exist
2.For Post meta:
Post meta API functions take in three piece of information:
- The post ID
- The data key
- The data value
Sample code
global $post;
add_post_meta( $post->ID, 'cate1', 'showCat1QuestionValue');
Have a look for metabox in more details: