Sound Problems with my iPhone 4?
My girlfriend dropped her iPhone 4 in a glass of coke (it submerged completely). Afterwards, she experienced the same symptoms as you. To fix it, she put the phone in a bowl of rice, and took a blow dryer to it once or twice a day. I believe she also got some electrical contact cleaner and cleaned the connection on the bottom that you plug the USB cable into. 

It took about a week, but the phone worked perfectly afterwards (and has been working perfectly ever since).