The dock connector would be a good place to start. If the dock connector isn't working the battery won't charge and of course won't connect to the computer. Try replacing that first. If still no luck, try replacing the battery. Alternatively you can test the battery with a multimeter by measuring the voltage. Let us know what you find. Also, you should tell us specifically which iPhone you are working with so we can help as best as we can.