Client.print with esp8266. not connecting to client

My guess is that there is something wrong with the parts of the sketch you did not show. It would also help to know what happens when "It works." in the browser and what happens when it "is not working on the esp8266"