Is your iPhone working? If so, sounds like a cable issue to me. If it's not, then it sounds like you have to enter restore mode.
As you plug it into the dock/cable, hold the sleep/wake and the home button for about 10 seconds until you see the Apple logo, then release the sleep button. Keep holding the home button until the iTunes connect logo comes up on your phone (should take another 10 seconds or so). Hope this helps.