Adding multiple statements in 'if-else' function

Hello guys, I am using Arduino Mega 2560, I want to add multiple statements for a condition in 'IF-ELSE' function.
But only the first statement follows the if-else condition. Where am i going wrong?

Below is a part of the code.
Only the fillRect works according to the condition.
digitalWrite runs as the code is scanned.

void Valves()
{
  if (EQ == 0) {
    tft.fillRect(0, 260, 40, 40, TFT_RED);
    digitalWrite(31, HIGH);
  }
  else tft.fillRect(0, 260, 40, 40, TFT_GREEN);
  digitalWrite(31, LOW);

  if (RF == 0) {
    tft.fillRect(50, 260, 40, 40, TFT_RED);
    digitalWrite(33, LOW);
  }
  else tft.fillRect(50, 260, 40, 40, TFT_GREEN);
  digitalWrite(33, HIGH);

  if (LW == 0) {
    tft.fillRect(100, 260, 40, 40, TFT_RED);
    digitalWrite(35, LOW);
  }
  else tft.fillRect(100, 260, 40, 40, TFT_GREEN);
  digitalWrite(35, HIGH);

  if (LF == 0) {
    tft.fillRect(150, 260, 40, 40, TFT_RED);
    digitalWrite(37, LOW);
  }
  else tft.fillRect(150, 260, 40, 40, TFT_GREEN);
  digitalWrite(37, HIGH);

  if (RW == 0) {
    tft.fillRect(200, 260, 40, 40, TFT_RED);
    digitalWrite(39, LOW);
  }
  else tft.fillRect(200, 260, 40, 40, TFT_GREEN);
  digitalWrite(39, HIGH);
}

Are you missing braces on your elses?

missing the brackets at the else will assume that the it must execute just the one instruction (the next one or the next line), the rest of the code will run as part of the else's container loop.

void Valves()
{
   if (EQ == 0)
   {
      tft.fillRect(0, 260, 40, 40, TFT_RED);
      digitalWrite(31, HIGH);
   }
   else
      tft.fillRect(0, 260, 40, 40, TFT_GREEN);
   digitalWrite(31, LOW);  // ************************* executes unconditionally.

   if (RF == 0)
   {
      tft.fillRect(50, 260, 40, 40, TFT_RED);
      digitalWrite(33, LOW);
   }
   else
      tft.fillRect(50, 260, 40, 40, TFT_GREEN);
   digitalWrite(33, HIGH);  // ************************* executes unconditionally.

   if (LW == 0)
   {
      tft.fillRect(100, 260, 40, 40, TFT_RED);
      digitalWrite(35, LOW);
   }
   else
      tft.fillRect(100, 260, 40, 40, TFT_GREEN);
   digitalWrite(35, HIGH);  // ************************* executes unconditionally.

   if (LF == 0)
   {
      tft.fillRect(150, 260, 40, 40, TFT_RED);
      digitalWrite(37, LOW);
   }
   else
      tft.fillRect(150, 260, 40, 40, TFT_GREEN);
   digitalWrite(37, HIGH);  // ************************* executes unconditionally.

   if (RW == 0)
   {
      tft.fillRect(200, 260, 40, 40, TFT_RED);
      digitalWrite(39, LOW);
   }
   else
      tft.fillRect(200, 260, 40, 40, TFT_GREEN);
   digitalWrite(39, HIGH);  // ************************* executes unconditionally.
}

If you put all statements on their own line and use the IDE autoformat tool (ctrl-t or Tools, Auto Format) you can see which parts of the else structures execute unconditionally because of missing enclosing brackets.

Okay. Thank you all for helping me out.