Why does my iPhone 3 say 'Charging not supported with this accessory'?

So recently my ipod got stolen, and my friend decided to give me her old iphone 3 to use instead. I used my old ipod charger with it, and it worked but then i updated the software to iOS 6.1.6 and it wouldn't charge in an outlet anymore, it is only able to charge when i connect it to my computer.

I already searched online about this and someone said to put the phone onto airplane mode then charge it in an outlet but that didn't work.

Any suggestions?

THE WIRE COULD BE DAMAGED?

Oh this has happened to me there's no soultuion insted of getting a latest charger
i bought one and.