Connected, but wouldn't work solution
My problem was my iPhone found my linksys router and showed full connection, but I couldn't get it to work (occasionally safari would load a page I'd already loaded using Edge, but even that was sparingly). I tried setting no security/no password, and still nothing.
Finally I found a post on the apple user discussion forum that mentioned they went to their Wi-Fi settings on the iPhone and switched to Static and typed in the DNS from the router. I tried DNS 1 first (for me it was 198.168yada yada yada) and it didn't work. I then tried DNS 2 (for me it was 68.87yada yada yada) and it WORKED!
So for the record I'm using a linksys WRT54G router with WEP security (make sure you type in the WEP Hex/ASCII password on the iPhone).
Hope this helps!
The Boom King