How to post data in mysql

Hi, im working on a project and i need to post data from my photon to mysql db. I dont want to use any weebhook, i want to do it directly, using php or any stuff. But i dont find something that can help me (im newbie).

All help will be appreciated.

Im using this basic code that is getting analog values in real time.

int photoresistor = A0;
int power = A5;
int analogvalue;

void setup() {
Particle.variable(“analogvalue”, &analogvalue, INT);
void loop() {
analogvalue = analogRead(photoresistor);
Particle.publish(“upluz”, String(analogvalue));

There are other threads that deal with similar demands - try the search feature

1 Like