IR remote with two leds

watatsumi:
this is my code now but when I look in the serial monitor the green turns on and I get a 1 for green on then a 0 for red off and if I keep pushing buttons on my remote other then the off button nothing happens to the light (it stays on until I press the off button). With the red led it turns on giving me a 0 green then 1 red but thats only if I press it quickly and dont hold for any amount of time. Otherwise I get 0 green 1 red -1(assuming thats the code for button holding) then 0 green 0 red. I don't quite understand why the red one won't stay on when the green one does.

Well, your decision code is fine. Nothing wrong with it at all. I suspect the IR operation is either not as you think it is, or there is something wrong with the decode, or ???

Here's your code, modified to test and report on the operation, but without the IR stuff (I don't have any IR phototransistors to test with).
Your code is still in this one, but commented out.
recv_value starts with 0, then changes at count = 10, 20, 30, and 40, in the order

The output shows that the if conditions are working as written.

int recvPin = 2;
int redled = 4;
int greenled = 8;
byte count = 0;
//IRrecv irReceiver(recvPin);
//decode_results results;
long recv_value = 0;

void setup(){
  pinMode(redled, OUTPUT);
  pinMode(greenled, OUTPUT);
  digitalWrite (redled,LOW);
  digitalWrite (greenled,LOW);
  Serial.begin(115200); //Initialize the serial port with a baud rate of 9600

  Serial.print(digitalRead(greenled));
  Serial.println(digitalRead(redled));
 
//    irReceiver.enableIRIn(); // Start the receiver
//  irReceiver.blink13(true);
}

void loop() {

//  if (irReceiver.decode(&results)) {
//    recv_value = results.value;
    Serial.println(recv_value);

    if (recv_value == 1347255 && digitalRead(greenled) == LOW && digitalRead(redled) == LOW){
      digitalWrite(greenled, HIGH);
      Serial.print("In if #1: ");
      Serial.print(digitalRead(greenled));
      Serial.print(", ");
      Serial.println(digitalRead(redled));
//      irReceiver.resume();
    }

    else if (recv_value == 1363635 && digitalRead(greenled) == LOW && digitalRead(redled) == LOW){
      digitalWrite(redled, HIGH);
      Serial.print("In if #2: ");
      Serial.print(digitalRead(greenled));
      Serial.print(", ");
      Serial.println(digitalRead(redled));
//      irReceiver.resume();
    }

    else if (recv_value == 1371825 && ( digitalRead(greenled) == HIGH || digitalRead(redled) == HIGH)){
      digitalWrite(greenled, LOW);
      digitalWrite(redled, LOW);
      Serial.print("In if #3: ");
      Serial.print(digitalRead(greenled));
      Serial.print(", ");
      Serial.println(digitalRead(redled));
//      irReceiver.resume();
    }

//    else{
//      irReceiver.resume();
//    }
//  }

  count++;
  Serial.print(count);
  Serial.print("  ");
  
  if (count == 10) {
    recv_value = 1347255;
  }
  if (count == 20) {
    recv_value = 1371825;
  }
  if (count == 30) {
    recv_value = 1363635;
  }
  if (count == 40) {
    recv_value = 1371825;
  }
  if (count == 50) while(1) {};
}