Try telling your iPhone to forget the network you're trying to connect to, and start over, re-entering all the information and connecting to the network. Do you still have a wonky internet connection after that? Also, what model iphone and which version of iOS are you running?