There is a choice of 2..1st is a new battery, likely yours is 2 years old and ending it's life. If you have noticed that it was hard to charge/took longer to charge/random crashes, then that may be the culprit. 2nd choice is the charging port... it could be as simple as dirt and dust from pockets/bags building up in the USB bay. Turn your phone off and use something like a toothpick to dig out all the lint, just go easy..you don't want to damage the pins.you could also use a soft toothbrush to gently give the bins a brush off. Try charging via wall charger again and see what happens.(gives more power than pc/mac usb for charging)If still no change, isn't recognised in itunes, then you may need to buy a new dock connector. Try the cleaning first and let us know how you get on.