IPhone not charging but charger isn't broken?

I just bought a new charger for my iphone a couple weeks ago and it has been working fine until now. When I tried plugging the USB into the computer there's a pop up that says "USB Device Not Recognized" and it still will not charge.

Hmm. Seems like something's wrong with your iPhone or your computer. You should take your iPhone in to be checked