Reset, hold both home and power buttons for about 10 seconds until the iPhone begins to restart itself, ignore the "slide to power off" let the iPhone restart itself. See if better. If still problem, Restore iPhone with iTunes 10.7 or 11 on computer. See if better, if not and there is Warranty or AppleCare make Genius reservation and take to Apple for resolution. If no coverage, clean iPhone Charging Port with clean dry toothbrush. See if better, if not, clean again with small amount of Isopropyll Alcohol.