Well it could be the cord or the battery. Try a different cord in the phone and try your cord in another. If a different cord charges it, then you need new cord.
If, however, the other cord doesn't charge the phone either, then you need a new battery.