if you can get your hands on denatured alcohol, scrub the charging port clean with a toothbrush. Also a thumb tack will clean out most charging ports perfectly. Also check and make sure your pins arent broken within the charging port.
what kind of phone is it?