String and heap confusion
Yes, you could make a global String for getData and reserve space and reuse it every time the function is called. But what with String(getData.length())? 

And the parameters? You create a new String for every parameter. And the function senddata doesn't take a reference to the String (String&amp;), but it makes a new copy of each String parameter. So you create 12 small Strings with every call to this function. This is the evil of String. It does everything no matter at what cost.

And your sendCommand takes String too. That is why you can do "AT+CIPSTART=0,\"TCP\",\"" + HOST + "\"," + PORT and "AT+CIPSEND=0," + String(getData.length() + 4) as parameter to it. So every call to sendCommand creates two small Strings. That is 8. And every + on String can trigger a reallocation on heap.

Use C strings

void senddata(int temp1, int hum1, int dis1, int flood1, int heater1, int humid1) {
  char getData[256];
  snprintf(getData, sizeof(getData), "GET /update?api_key=%s&amp;field1=%d&amp;field2=%d&amp;field3=%d&amp;field4=%s&amp;field5=%s&amp;field6=%d",
      API, temp1, hum1, dis1, flood1, heater1, humid1);
  sendCommand("AT+CIPMUX=1", 5, "OK");
  char buff[32];
  snprintf(buff, sizeof(buff), "AT+CIPSTART=0,\"TCP\",\"%s\",%d" , HOST, PORT);
  sendCommand(buff, 15, "OK");
  snprintf(buff, sizeof(buff), "AT+CIPSEND=0,%d" , strlen(getData) + 4);
  sendCommand(buff, 4, "&gt;");
}

void sendCommand(const char* command, const int timeout, const char* find) {


F macro optimizes memory use, by using data stored in flash memory. The snprintf_P function is a version of snprintf for format string from flash.

snprintf_P(getData, sizeof(getData), (const char*) F("GET /update?api_key=%s&amp;field1=%d&amp;field2=%d&amp;field3=%d&amp;field4=%s&amp;field5=%s&amp;field6=%d"),
  API, temp1, hum1, dis1, flood1, heater1, humid1);


One of the classes of my StreamLib is CStringBuilder. With it the code could be:

char getData[256];
CStringBuilder sb(getData, sizeof(getData));
sb.printf(F("GET /update?api_key=%s&amp;field1=%d&amp;field2=%d&amp;field3=%d&amp;field4=%s&amp;field5=%s&amp;field6=%d"),
    API, temp1, hum1, dis1, flood1, heater1, humid1);
sendCommand("AT+CIPMUX=1", 5, "OK");
char buff[32];
CStringBuilder sb2(buff, sizeof(buff));
sb2.printf(F("AT+CIPSTART=0,\"TCP\",\"%s\",%d") , HOST, PORT);
sendCommand(buff, 15, "OK");
sb2.reset();
sb2.print(F("AT+CIPSEND=0,"));
sb2.print(sb.length() + 4);
sendCommand(buff, 4, "&gt;");