I have HTML Page with two text fields called first & last name, I have created table using wordpress codex with my plugin. Now, when I click submit in HTML form page, I need to store the data which I enter in text fields into my own Table. Kindly give a simple example.
Leave a Reply
You must be logged in to post a comment.
The following example creates a custom database table and inserts a row into the database. You can modify the INSERT query by replacing the variables with the values extracted from form fields. You can either store the INSERT SQL query in a string and use $wpdb -> query() function or directly use the $wpdb->insert() function to insert values into the table.