Why does my iPhone 4S say it's not charging, when it is?

Okay.So, awhile ago, my phone started acting up, or the charger So I THOUGHT. I had to wiggle it around in certain positions and keep pushing it in for it to say it was charging. And last night, it finally gave out. I let my phone die this afternoon it finally died. I left it on the charger anyways, even though it was completely dead and had no signs of life. I came back tonight, and tried to get it to work one more time before I have to go in and get a new cord, but the apple sign popped up then everything started up as normal and now it's at 100%! And it still it. Even though it says it's not charging. What could it be? Is it my phone? Water damage? Plugging my phone in to many times and ruining the part where the charger plugs in? Thanks. It seems to good to be true that it's back at 100% lol.

Your charger is problebly busted. Try a different charger. If that doesn't work then take it to an apple store.

It could be anything. Maybe its your battery. You can get a battery replacement from apple