Chosen Solution

I recently purchased an iPhone 4 on ios 5 for $10 on eBay the phone fully works (i got it for cheap because it had no battery) but when i plugged it in i noticed the charger was starting to come out. Can someone please help?

You would have to clean the charger port but that could cause the charging port not to work because the connector is usually worn out in this case. Worst case scenario you would have to replace the charging port. Here are guide and parts from iFixit if needed: iPhone 4 Dock Connector Replacement [linked product missing or disabled: IF182-009-1]