最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to insert data into MySQL database from the form created in WordPress site

programmeradmin1浏览0评论

How can I insert the data entered into the form in WordPress site to the MySQL database? I have created a form in the site. I am able to run PHP codes using snippets but I don't know how to update the database table from the values entered into the form in the WordPress site.

How can I insert the data entered into the form in WordPress site to the MySQL database? I have created a form in the site. I am able to run PHP codes using snippets but I don't know how to update the database table from the values entered into the form in the WordPress site.

Share Improve this question edited Jan 3, 2019 at 22:28 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Jan 3, 2019 at 15:39 Sidharth KSidharth K 211 silver badge2 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Basically, i use Contact Form 7 and it's third party extension for storing values in database i.e.: https://wordpress/plugins/contact-form-cfdb7/.

Or, if you want to create a custom form and store the value in database you can Create a Custom Post Type and use wp_insert_post() function to insert your respective values.

发布评论

评论列表(0)

  1. 暂无评论