LCD display wrong data after if else statement

Im trying to make a humidity temperature sensor that would set a red led on when exceeded a certain temperature. When i compiled my code without the if else statement, the lcd reads the temp and humidity just fine. But when i write if else statement into the code, the lcd display the correct data and the show -999C and -999%. It loop between the correct data and the -999. Code attached below :

#include <dht.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 7
int LED1 = 8;
int LED2 = 9;
int LED3 = 10;
float temp;

void setup(){
lcd.begin(16, 2);
Serial.begin(9600);
pinMode (LED1, OUTPUT);
pinMode (LED2, OUTPUT);
pinMode (LED3, OUTPUT);

}

void loop()
{
DHT.read11(DHT11_PIN);
//read temperature
lcd.setCursor(0,0);
lcd.print("Temp: ");
lcd.print(DHT.temperature);
lcd.print((char)223);
lcd.print(“C”);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
//read humidity
lcd.setCursor(0,1);
lcd.print(“Humidity: “);
lcd.print(DHT.humidity);
lcd.print(”%”);
Serial.print("Humidity = ");
Serial.println(DHT.humidity);
delay(1000);

if(temp>28)
{

digitalWrite (LED1, HIGH);
}
else
{
digitalWrite (LED1, LOW);
}

}

Please use the CODE button when posting code. The <> icon at top left.

You never assign DHT.temperature to temp.
So temp will always be 0.0

David.