title: NodeMCU Get data from webswerver and update value
body: <p>I am using Nodenmcu with arduino IDE . I have used DHT11 IC to read temperature and humidity. Now i would like to add parameter in web page called set_temp . When Set_temp value being set to value the value should get updated when change icon has been pressed. Here is my code. My code is  working till to enter the text from web but it wont update set_temp value</p>
  
  <pre><code>#include &lt;ESP8266WiFi.h&gt;
  #include "DHT.h"
  
  static float Set_Temp;
  DHT dht;
  int value = LOW;
  
  const char* ssid = "esp8266";
  const char* password = "Test123456";
  
  int ledPin = 13; // GPIO13
  WiFiServer server(80);
  
  void setup() {
    Serial.begin(115200);
    delay(10);
  
    pinMode(ledPin, OUTPUT);
    digitalWrite(ledPin, LOW);
    dht.setup(D3);   /* D1 is used for data communication */
    // Connect to WiFi network
    Serial.println();
    Serial.println();
    Serial.print("Connecting to ");
    Serial.println(ssid);
  
    WiFi.begin(ssid, password);
  
    while (WiFi.status() != WL_CONNECTED) {
      delay(500);
      Serial.print(".");
    }
    Serial.println("");
    Serial.println("WiFi connected");
  
    // Start the server
    server.begin();
    Serial.println("Server started");
  
    // Print the IP address
    Serial.print("Use this URL to connect: ");
    Serial.print("http://");
    Serial.print(WiFi.localIP());
    Serial.println("/");
  
  }
  
  void loop() {
    // Check if a client has connected
    WiFiClient client = server.available();
    if (!client) {
      return;
    }
  
    // Wait until the client sends some data
    Serial.println("new client");
    while(!client.available()){
      delay(1);
    }
  
  
  // New code has been added 
  
   delay(dht.getMinimumSamplingPeriod());  /* Delay of amount equal to sampling period */
  
    float humidity = dht.getHumidity(); /* Get humidity value */
    float temperature = dht.getTemperature(); /* Get temperature value */
  
   // Serial.print(dht.getStatusString());  /* Print status of communication */
  
  if(temperature&gt;=Set_Temp)
  {
  
    digitalWrite(ledPin, HIGH);
      value = HIGH;
  
  }else
  {
    digitalWrite(ledPin, LOW);
      value = LOW;
  }
  
  
  
  
    // Read the first line of the request
    String request = client.readStringUntil('\r');
    Serial.println(request);
    client.flush();
  
    // Match the request
  
  
   /* if (request.indexOf("/LED=ON") != -1)  {
      digitalWrite(ledPin, HIGH);
      value = HIGH;
    }
    if (request.indexOf("/LED=OFF") != -1)  {
      digitalWrite(ledPin, LOW);
      value = LOW;
    }*/
  
  // Set ledPin according to the request
  //digitalWrite(ledPin, value);
  
    // Return the response
    client.println("HTTP/1.1 200 OK");
    client.println("Content-Type: text/html");
    client.println(""); //  do not forget this one
    client.println("&lt;!DOCTYPE HTML&gt;");
    client.println("&lt;html&gt;");
  
    client.print("Relay_Turn_On_Status: ");
  
    if(value == HIGH) {
      client.print("On");
    } else {
      client.print("Off");
    }
   // client.println("&lt;br&gt;&lt;br&gt;");
   // client.println("&lt;a href=\"/LED=ON\"\"&gt;&lt;button&gt;Turn On &lt;/button&gt;&lt;/a&gt;");
  //  client.println("&lt;a href=\"/LED=OFF\"\"&gt;&lt;button&gt;Turn Off &lt;/button&gt;&lt;/a&gt;&lt;br /&gt;");  
  //  client.println("&lt;/html&gt;");
  
  
  client.print("&lt;/html&gt;");
  client.print("&lt;head&gt;");
  client.print("&lt;title&gt;My Page&lt;/title&gt;");
  client.print("&lt;/head&gt;");
  client.print("&lt;body&gt;");
    client.print("&lt;br&gt;&lt;br&gt;");
     client.print("Set_Temp: ");
      client.println("&lt;input type=text name=textbox size=5 value=Enter_Temp_Here");
      client.println("&lt;br&gt;&lt;input type=submit value=Change &gt;&lt;br&gt;");
      client.println("&lt;/div&gt;");
       client.println("&lt;/body&gt;");
       client.println("&lt;/html&gt;");
  
  Set_Temp:"&lt;br&gt;&lt;input type=submit value=Change &gt;&lt;br&gt;";
  //Set_Temp:"&lt;input type=text name=textbox size=5 value=Enter_Temp_Here&gt;";
  Serial.println(Set_Temp);
  
  
  
  client.println("&lt;br&gt;&lt;br&gt;");
    client.println("DHT11_HumidityReading: ");
    client.println(humidity,1);
     client.println("&lt;br&gt;&lt;br&gt;");
    client.println("DHT11_Temprature Reading: ");
    client.println(temperature,1);
     client.println("&lt;br&gt;&lt;br&gt;");
  
    client.println("Set_Temp: ");
    client.println(Set_Temp);
     client.println("&lt;br&gt;&lt;br&gt;");
  
  
    delay(1);
    Serial.println("Client disonnected");
    Serial.println("");
  
  }
  </code></pre>
  
  <p>My main doubt in this part of code where once i read it wont update.</p>
  
  <pre><code> Set_Temp:"&lt;br&gt;&lt;input type=submit value=Change &gt;&lt;br&gt;";
      //Set_Temp:"&lt;input type=text name=textbox size=5 value=Enter_Temp_Here&gt;";
      Serial.println(Set_Temp);
  </code></pre>
  
  <p>If i use like this. it will display -1</p>
  
  <pre><code>Set_Temp=readString.indexOf(2);
  </code></pre>
  
  <p>I followed the method of get &amp; post from HTTP <a href="https://www.w3schools.com/htmL/[Serial" rel="nofollow noreferrer">https://www.w3schools.com/htmL/[Serial</a> Out Here<a href="https://i.stack.imgur.com/HfXww.jpg" rel="nofollow noreferrer">][web page]</a></p>
  
  <p>How can i change my Set_Temp value from text box.</p>