         WiServer.print("</html> ");
         return true;
    }
-}
-
-// This is the webpage that is served up by the webserver
-const prog_char webpage[] PROGMEM = {"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<center><h1>Hello World!! I am WiShield</h1><form method=\"get\" action=\"0\">Toggle LED:<input type=\"submit\" name=\"0\" value=\"LED1\"></input></form></center>"};
+   else {
+     WiServer.print(" ");
+     return true;
+   }
+}
 
 // Storage for the recorded code
 int codeType = -1; // The type of code

      WiServer.print("<html><head><title>Led switch</title></head>");
    
      WiServer.print("<body><center>Please select the led state:<center>\n<center>");
      for (stateCounter = 0; stateCounter < 3; stateCounter++) //for each led
      {
        numAsCharBuff[0] = (char)(stateCounter + 49); //as this is displayed use 1 - 3 rather than 0 - 2
        numAsCharBuff[1] = '\0'; //strcat expects a string (array of chars) rather than a single character.


int RECV_PIN = 4;
int BUTTON_PIN = 5;
int STATUS_PIN = 6;

IRrecv irrecv(RECV_PIN);
IRsend irsend;
