I have the problem that, when i 'myClient.Println' the html codes , the browser shows the code and not the page.
the browser shows as follow.
HELLOHTTP/1.1 200 OK
Content-Type: text/html
Connection: close
LED
Click to switch LED on and off.
LED13I use this code:
if (myClient.available()) {
char c = myClient.read(); // read 1 byte (character) from client
HTTP_req += c;
if (c == '\n' && currentLineIsBlank) {
myClient.println("HTTP/1.1 200 OK");
myClient.println("Content-Type: text/html");
myClient.println("Connection: close"); // Dopo la risposta la connessione si interrompe
myClient.println();
myClient.println("");
// send web page
myClient.println("");
myClient.println("");
myClient.println("");
myClient.println("Arduino LED Control");
myClient.println("");
myClient.println("");
myClient.println("
LED
");myClient.println("
Click to switch LED on and off.
");myClient.println("<form method="get">");
//start check
ProcessCheckbox(myClient);
// start check
myClient.println("");
myClient.println("");
myClient.println("");
Serial.print(HTTP_req);
HTTP_req = "";
break;
from where come out --> HELLO?