My iphone 4s won't charge on wall but charges only connected to computer?

I got an iphone 4s which is used. I bought a charger today but the iphone doesn't charge
on wall. Only in the pc.

There could be one of two problems. Either the outlet you have chosen does not work, or the charger converter does not work. Your cored obviously works when it is connected to your computer so it is the power supply that is the issue.

Hi
the charger is original? No!
to charge properly you need to have input 100-240v(0.2A max)
frequency 50-80hz
output 5V (1a 5w)
try to buy only an usb charge adaptor only (2.5$)

fix for sure? Buy an original charge(15$)

There might be an issue with the wall charger which you had bought or may be with power supply plug which you are using. Your iphone is fine as it is getting charge through computer.