Chosen Solution

iphone not charging but it turns on when i plug in the charger. I cleaning dock connector, try new cable, checking battery connector, replace battery, still not charging, please help.

Ondrej, make sure that the battery connector is properly seated and connected. Of course it is possible that you have a failed charging coil or “USB fuses”. You will at least need a multimeter to check those components for continuity.