Button writing to MYSQL database

Hey guys I am a noob to wordpress just trying to make it out here doing some basic home automation project. I have a group of sensors that read data and send it to a MYSQL database that I then graph or display it this part is fine. But I also want to be able to press a button on my webpage and send a binary signal to a MYSQL database.

Once I get my binary signal logged in the database I will use another set of logic to send it to the microcontroller, but this part I am not as worried about.

My setup is a bluehost dedicated server (overkill right?) with wordpress and elementor pro, does anyone know the easiest way to do this? I have tried dropping a button in elementor, but how would one go about adding code like php that can insert into a mysql database? Any help would greatly be appreciated as I mentioned I am somewhat of an idiot/noob.

Topic buttons mysql Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.