Uploading data to sql database using nodeMCU through php file

Just to clarify: is the program on the MCU connecting directly to the database or is it calling a PHP script on your website? I assumed the former but reading it again I may have been wrong.

In any case, the latter isn’t supposed to work either. Again, we provide a service for website hosting, not for IoT data collection. And we have this system in place to help ensure this:

Actually status code 400 or “a 4xx status code”, which could also be status code 403? I can’t think of anything that would cause our hosting to return a 400 status code, which seems to me like it might be your website code that’s refusing the input from your MCU.

2 Likes