I would inspect the lightning connector. My guess is that there is either debris in the port, or some of the pins are bent/missing. If the former, you can generally clean it out with a small instrument, just be careful not to damage the pins in the process!
If the latter, you're more than likely looking at replacing the lighting connector
[guide|18227|Here's the Guide for that replacement, if you feel up to the task.]