IPhone 4S is being stupid when charging?

My iPhone 4S I have had for four years with no trouble and suddenly in the past week, I have had trouble charging it. It would go from 70% then back to 20% or it would decrease whilst charging. Sometimes it won't charge and I have to hit the wall adapter or the cord for it to charge.

The cord is also brand new.

My Samsung Galaxy S2 was also stupid like this. When I charged it by plugging it to USB on my computer, this will happen. Later, I changed a cable and use the plug board to charge it, this didn't happen again.

  • Why isn't my iPhone 5 being detected by itunes or charging? Lately while I'm charging my phone, it would vibrate twice every few minutes. But today when I connected it it wouldn't charge. I tried connecting it to itunes but a box popped up saying " your device is not detected. Please unplug and try again." Please help!
  • Why is my iPhone being stupid? - 1 I have a iphone4s and I never had problems but now every app I open crashes and when I open safari it brings me right back to the home page and when I try to look at my pictures it says "PNG" i don't know what's wrong with my phone it's never done this before
  • My IPhone 5 isn't charging when I plug it in but the charging 'symbol' comes up? I've only had my phone for a few weeks- since Christmas, and today it's been playing up, it keeps turning on and off then when my phone is on the screen at the bottom flickers! I have never dropped this phone or it hasn't been water damaged! I resorted my phone by pressing the lock and home screen and put it on charge, my charge percentage isn't going up it keeps decreasing, even though it says that my phone is on charge, what should I do?
  • My iphone 4 is being stupid? Alright, so when I got the iOS 6 update, it wouldn't let me send, only receive, but then I fixed it by just continuously restarting, hard reset, and resetting network settings several times. Now it's been 3 days since then and now my phone won't send OR receive messages. (It says it sends but noone actually receives it) Has this happened to anyone? Can anyone help? Please?