# How to insert data in a mysql table with thunkable?

**URL:** <https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [April 13, 2021, 10:06pm UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377 "2021-04-13T22:06:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![miramar](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@miramar](https://community.thunkable.com/u/miramar)\
**Post date:** [April 13, 2021, 10:06pm UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/1 "2021-04-13T22:06:13Z")

</div>

Hello dear thunkable community,

I am really strugling with this since several weeks : could you help me to understand how I can insert data in my mysql database with thunkable please?

I saw that I can use Web API, but all the examples I saw is to get information from a public API and display it in the app. But my need is in the other direction : I need to connect to a database, and insert data in a table. And I am sorry, I really didn’t find any clear information about it, maybe it is too obvious?

Could anyone can guide me how to do it please? My mysql database is working with a wordpress website.  
Do I need to create a file for the connexion? where to put it? how to call it when wanting to insert data? …

Thanks a lot

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [April 13, 2021, 10:28pm UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/2 "2021-04-13T22:28:34Z")

</div>

Chances are if you can’t find much info about something in these forums then it’s not because it’s too obvious but because it’s hard to do.

This topic is similar to what you’re asking but there’s no solution posted:

> [@Connect to an Online MySql database with Thubkable X](https://community.thunkable.com/t/connect-to-an-online-mysql-database-with-thubkable-x/65815):
>
> Hi I created a website on [www.000webhost.com](http://www.000webhost.com) and use the online MySQL database. I would like to retrieve/insert and update data on the MySQL database through a Thunkable X app. I currently use PHP pages to access the database. Is it possible to connect to the MySQL database with Thunkable X? If so, any pointers will be appreciated. Regards, Jason

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [April 14, 2021, 12:19am UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/3 "2021-04-14T00:19:27Z")

</div>

There’s no reason you couldn’t do this, and if you already have a website talking to the MySQL database, you’d just need to craft a POST with the WebAPI block it’s understand. Probably not a zero code option (unless someone has already done it), but if you’ve already got a database backed website and are comfortable hacking at it, it should be pretty doable.

---

<div class="post-metadata">

**Author:** ![miramar](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@miramar](https://community.thunkable.com/u/miramar)\
**Post date:** [April 14, 2021, 7:34am UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/4 "2021-04-14T07:34:40Z")

</div>

I thought it too, until I saw this subject : [How use Response with MySQL & Airtable?](https://community.thunkable.com/t/how-use-response-with-mysql-airtable/766373)  
The author knows how to do it, but someone asks how and his response is not clear for me ☹

---

<div class="post-metadata">

**Author:** ![miramar](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@miramar](https://community.thunkable.com/u/miramar)\
**Post date:** [April 14, 2021, 7:36am UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/5 "2021-04-14T07:36:52Z")

</div>

Yes, I think it is something with a POST instruction.  
But how to enter the name, and the credentials to the database in thunkable? I am not confortable in hacking 🙂

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 14, 2021, 7:58am UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/6 "2021-04-14T07:58:10Z")

</div>

The first step is to get the API configuration from the WordPress side such as this link

> **[WordPress REST API (Version 2)](https://wordpress.org/plugins/rest-api/)**
>
> Access your site's data through an easy-to-use HTTP REST API. (Version 2)

Once WordPress made the APIs available, you can use them as instructed.

[Edit]  
I also found this really helpful

> **[WordPress REST API Tutorial: A Beginner's Guide](https://www.hostinger.com/tutorials/wordpress-rest-api)**
>
> This WordPress REST API tutorial will introduce you to the basics of REST API and explain the steps on how to use it.

---

<div class="post-metadata">

**Author:** ![miramar](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@miramar](https://community.thunkable.com/u/miramar)\
**Post date:** [April 15, 2021, 11:56am UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/7 "2021-04-15T11:56:05Z")

</div>

Thanks Muneer, I will take a look at that 🙂

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:25pm UTC](https://community.thunkable.com/t/how-to-insert-data-in-a-mysql-table-with-thunkable/1222377/8 "2024-11-08T13:25:20Z")

</div>


