how to get specific data from the web server code?

I need help in getting data from the web server code.

I am sending words to a web server using the Ethernet web server code from the 1st Ethernet shield and need the 2nd Ethernet shield to get specific word (eg. Yes) from the web server (using the web client code).

However, I am not able to do so. I try using :

if (client.available())
{
char c = client.read();
if(c=='Yes')
{
Serial.print("Yes obtained");
}
}

Did I use the code wrongly?

Thanks in advance for your help.

    char c = client.read();
     if(c=='Yes')

Which ONE key did you press to get the ONE character in the single quotes? Please post a picture of your keyboard with that ONE key circled.

If you want to compare strings, you need to collect strings. Then, you need to use strcmp(). This has only been discussed about 400 times this week.

Paul raises a good point: 'Yes' has three chars, so how does reading one character magically turn into three characters? Second, you have made several posts on this Forum, and yet you don't post your code according to the directions explained in the first two posts made at the top of this Forum. Please read those and use the code tags ('#') to surround your code. Finally, would this make more sense to you:

if (client.available())  {
    char c = client.read();
    c = toupper(c);
     if (c == 'Y')  {
        Serial.println("Yes obtained");
     }
}