My iphone will no longer charge?

I've been getting the error message " Charging is not supported wiyh this accessory". I tried changing to a new cable, and to another connector for the cable. At first it said "charging" even thoufh the actual battery percentage continued to go down. Then it gave that error message again, now it continues to say "unplugged" for its status even though its plugged in. The powper outlet itself works fine. What should I do? Its a version 4.2.6 (8E200) and a model MC676LL.

Added (1). Typo in my question. I meant "power" outlet.

I think it would be best you take your phone to apple store

Try using an genuine Apple charger.

Go to customer service, they will replace your phone free of cost.