My iPhone 5 doesn't say it's charging. If I leave it on the charger it will sometimes go up a couple percent then drop. How do I fix it

My iPhone 5 doesn't say it's charging. If I leave it on the charger it will sometimes go up a couple percent then drop. How do I fix it

That is a common rechargeable battery fault,
the only fix is a new battery installed.