send data to msql database with wifi (yun)

hii can any one help me
i wanna send data from arduino yun over wifi to a local database(msql) like wamp server
and i don't know what i do !! ? :fearful: :disappointed_relieved:

I have just got this working :slight_smile:

The best way that i found to get this working is using curl from the Yun side and then i created a custom PHP page that accepted my data and added it in to the mySQL DB.

I have the following in a function that i just call.

The Field1, Field2 is the name of the data fields that you want to post to in your PHP page. Field1Data and Field2Data is the data you want to post. IP address at the bottom is the address of the web server that has your PHP that dose the post to the DB.

Process postdata; 
postdata.begin("curl");
  
String cmd = "--data";
postdata.addParameter(cmd);
  
cmd= "Field1="+Field1Data+"&";
cmd= cmd +"Field2="+Field2data;

postdata.addParameter(cmd);
  
cmd= "http://192.168.0.10/add.php";
postdata.addParameter(cmd);
postdata.run();

while (postdata.available()>0) {
  char c = postdata.read();
  Serial.print(c);
}
// Ensure the last bit of data is sent.
Serial.flush();