Wifi server to control led on and off from local webpage.. - ..if statement doesnt work... Im a newbie on this arduino thing and I would like to build a curtain remotecontrolled from a local webpage with 2 buttons... a up an a down... 

I got the connection via my phone the the local page with the buttons. :D 

My problem on this one is that the buttons' if statement (command == on); doesnt work or in other words the client.println(command); get the "on" command and write it on the page... but it dont do the function in the if statement (the button)...

Can anybody help me...? it should be simple..:D  

    #include &lt;Bridge.h&gt;
    #include &lt;YunServer.h&gt;
    #include &lt;YunClient.h&gt;

    int LEDPIN = 3; // your LED PIN
    YunServer server;

    String readString;


    void setup() {
  // Start our connection
  Serial.begin(9600);
  pinMode(LEDPIN,OUTPUT);
  digitalWrite(LEDPIN,HIGH); // turn on Led while connecting
  Bridge.begin();  

  // Show a fancy flash pattern once connected
  digitalWrite(LEDPIN,LOW); 
  delay(150);
  digitalWrite(LEDPIN,HIGH); 
  delay(150);
  digitalWrite(LEDPIN,LOW); 
  delay(150);
  digitalWrite(LEDPIN,HIGH); 
  delay(150);
  digitalWrite(LEDPIN,LOW); 
  delay(150);

  // Disable for some connections:
  // Start listening for connections  

  // server.listenOnLocalhost();
  server.begin();

}

/* ------------------------------------------------*/
/* --------------- End WIFI connection ------------*/
/* ------------------------------------------------*/


void loop() {
  YunClient client = server.accept();
  if (client) {
      process(client);
    client.stop();
  }
  delay(50);
}




void process(YunClient client) {
  String command = client.readStringUntil('\\'); 

  client.println("Status: 200");
  client.println("Content-type: text/html");
  client.println();
  client.println("&lt;B&gt;&lt;Center&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");
  client.println("&lt;a href='/arduino/on\\'&gt;ON&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");
  client.println("&lt;a href='/arduino/off\\'&gt;OFF&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");
  client.print("Command: ");
  client.println(command);
  client.println("&lt;/B&gt;&lt;/Center&gt;");


/* ------------------------------------------------*/
/* ------------------- Buttons --------------------*/
/* ------------------------------------------------*/


  if (command == "on") {
    digitalWrite(LEDPIN,HIGH);
    digitalWrite(13,HIGH);
  }

  if (command == "off") {
    digitalWrite(LEDPIN,LOW);
     digitalWrite(13,LOW); 
  }
}
Pretty sure your problem is coming from the fact that you chose to use the backslash as your terminator character. The backslash requires special handling when encoded as a URL. You can observe this by Googling for "\" and and the results page you'll see your query in the address bar assigned to the "q" variable:
q=%5C
my entire URL looked like this, you may have something a bit different:
https://www.google.com/?gws_rd=ssl#q=%5C

Ok - so if you want a quick fix, stop using the \ to terminate your commands, since backslashes are often used to help sort out special characters (like "TAB" as \t) it's a a really bad choice, but an honest mistake.

If you change your code to generate links terminated with dashes you can get around the issue

client.println("&lt;a href='/arduino/on-'&gt;ON&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");
client.println("&lt;a href='/arduino/off-'&gt;OFF&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;");


and of course change your readStringUntil invocation too

client.readStringUntil('-');


Edit:
You might want to use the "" if the hostname part of your URL contains a space:
http://my-web-server.com/on

And one more alternative, seek the "%" instead since that's going to be used to encode the backslash. In that case you just need to change the readStringUntil()