Send data to MySQL (Arduino Uno, Eth shield W5100, IR obstacle sensor) [solved]

Is there another PC in your network (apart from the one running the wamp server) where you could try the test:

http://192.168.0.121/arduino/getdata.php?sensor1=1&sensor2=0&sensor3=1

It just could be an access rights issue which prevents the arduino code working although, from the response you got back, it looks more like a malformed HTTP GET problem.

As for the alternate fail/success issue

  1. comment out the two client.stop() statements in your latest code.
  2. add a new client.stop() statement as the first statement at the beginning of the loop()

To see if that clears the issue.

The following is a better template to use where you are making repeated http get calls:

https://www.arduino.cc/en/Tutorial/WebClientRepeating . Maybe use the structure there.

You've said you can see the web server log files. What do you see for the last time you ran your script ? Do you see the full URL your script sent ? If so, post it ?