Try different cables. Inspect and clean the dock connector on the bottom of the phone, using wooden toothpicks or a dry toothbrush. You may have a failed battery. Normally the symptom of a bad battery is the phone will work when plugged in, but will shut down when disconnected from power.
This site contains user submitted content, comments and opinions and is for informational purposes only.
Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site.