problem with my if statment

Hi

I don't see any internal pull-up's on the input - are you using external pull-ups?

-Fletcher