Thanks for using Apple Support Communities. It's our understanding that you're seeing an error when trying to charge your iPhone. You've come to the right place! The steps in the following resource can help:
If your iPhone or iPod touch won't charge
If the issue persists, please provided the specific error message you're seeing. Does the issue occur with a different cable or adapter? Be sure to include any other troubleshooting steps that you may have tried.
Have a nice day!