How old is the iphone? It probably has nothing to do with the charger.
It sounds like your battery may have gone out. You could take it to an apple store, and have them put a new battery in. It doesn't cost much to do that and it would be like a brand new phone again. Otherwise what I would do, if my contract is up and its an older iphone model, then I would trade it in and upgrade on new contract (you would get some credit back for the phone even if its not working).
I think its better just to do that rather then put money into an older iphone, especially because the upgrade wouldnt cost much with a new contract.