I want the data of location and aRead to be inserted into a php link like so: …/RegisterValues.php?locationId={location}?value={aRead}
I’ve set up a webhook in Particle in many different ways, but I just can’t get it to post the data into my database.
I’ve tried Full URL: …/RegisterValues.php and changing the parameters in the publish string to that of my database columns. I’ve tried the FORM and Query input, but I just cannot get it to work. My current setup is like this: image
What I want to happen is the data from my publish string {{location}} and {{aRead}} is being placed in my phpmyadmin database under controllerId and value respectively.
I’m completely confused. If I just use the link …/RegisterValues.php?controllerId=2?value=50 in my browser, it inputs these values. But with change the names of the strings in the Particle.publish to fit the right columns in my phpmyadmin database, there’s literally nothing happening…
In requestbin it just shows me what I would expect: {"controllerId": 2, "value": 6}.
If you can enter the values in your browser URL bar, you need to be using GET not POST. And set the values as I entered above for query. Include only the part before the ? in the URL for the webhook.
I am using https://dashboard.particle.io/user/integrations to create the webhook. Been using the interface the most since I have no experience with JSON and I figured this was going to be an easy task, I was a bit wrong about that.
@Len Hi! I’m hoping you could provide some direction…
I’ve got the webhook running - it’s returning a url in the webhook console ‘HTTP Response’.
I can use json_decode to display my sensor data on the php page if I manually append the hook response url to my hosted php url.
I’m at a loss for what happens next - how are you using the webhook to update your DB in phypmyadmin?