If..else statement doesn't work correctly

Printable View