Hello,
I’ve been working towards sending information from my photon into a SQL database, referencing various threads on the forum. I made a webhook, and I have a PHP page which can successfully insert to the database. The problem is that I can’t seem to access the information which I am trying to publish.
I want to be able to send multiple pieces of information, but I’m currently just trying to insert the data as a whole. Could someone point out what I could be doing wrong? When the row is added to the database, the value for $data ends up being empty.
I currently have a IFTTT applet that takes the published data and puts it in a google docs spreadsheet, so here’s what actually gets published if it is useful information.
{“device”:Test_Unit, “sessionid”:11}
Hey flonch,
I’m in the same boat as you!
I wanted to see if you ever got anything to work.
The few threads on this topic seem like the solution is very simple, but apparently I’m missing something.
Sorry I don’t have any answers for you -
just wanted you to know you’re not the only one struggling with this.
If you figure it out, please let me know!
Hi again @flonch,
Thanks for responding so quickly the other night!
I’ve been working with what you told me, but am getting “NULL” returned on the PHP page.
Could you take a look at my code?
This is the webhook:
As far as the webhook goes, I just used the webhook builder. Just enter the event name, and the URL, also make sure it is on POST.
The PHP and your particle code seem fine though.