iPhone won't connect to wifi
Checking the obvious - you can connect to WiFi on another computer right? The iPhone frequently over-reports the strength of the WiFi connection, so you can see 2 or 3 bars but not actually connect because it times out.

Try holding the iPhone vertically with your fingers at the top and bottom - the WiFi receiver is in the side, so when you hold it with your hands at the sides, it reduces WiFi reception.