I think an easy way is to use get or post. Act in this way:
client.print("GET /nomeScript.php?var1="); // send this to apache on server to call the script "nomeScript.php"
client.print(var1);
client.println(" HTTP/1.1"); //
//Serial.println(" HTTP/1.1"); //
client.println("Host: www.myHost.com"); //
//Serial.println("Host: www.myHost.com"); //
client.println("User-Agent: Arduino"); // ethernet related stuff
//Serial.println("User-Agent: Arduino"); //
client.println("Accept: text/html"); //
//Serial.println("Accept: text/html"); //
//client.println("Connection: close"); //
//Serial.println("Connection: close"); //
client.println(); //
Serial.println();
After on a php srcipt you can save the variable in a text file or in a database as you need.