Iphone gets very hot when charging and battery dies fast?

I took it to Apple and the associate told me that the battery is fine and said I needed to restore my phone back to factory settings. I did restore it and of course, it did not work. That wasn't very helpful. It's still getting hot when I charge it and as soon as I take it off the charger it loses battery very fast. Within an hour I'm back at 2% battery life. Does anyone know what else the problem could be?

You should get a replacement iPhone. If urs is under warranty, you get a free new one.