My iPhone 4 will not connect to my Wi-Fi?

I have checked on all my electronics and they all are connected to my Wi-Fi, all except my phone. Once I get right next to the router it will connect but once I get two feet away from it, the phone disconnects from the Wi-Fi and can't find it anymore. Someone please help, I've tried everything.

When my boss initially had trouble connecting his 4S to our office Wi-Fi, I discovered from Apple forums that iPhones are notorious for software or hardware Wi-Fi issues. For example my boss had to find other Wi-Fi that his phone would connect to update his iOS before his 4S would connect to our Wi-Fi (same for several iPads at the time).

But some weeks later he could no longer connect to Wi-Fi, because he could not even turn on Wi-Fi ON despite trying everything including resetting networking or backing up and totally resetting the phone to factory defaults. So he had to get a warranty replacement 4S.

So if you try suggestions on the apple.com forums and nothing works, you could be having some sort of hardware failure.