IPhone won't charge properly?

My iPhone 4 went flat last night so I plugged it into the charger and it turns back on then off and on and off and continued doing this until I unplugged. When it turned back on, it was only for a split second and I could not do anything. I unplugged it for a while then plugged it in again and whenever I check it, it just shows the low battery picture. I have tried holding the home and lock button and it just shows the battery signs. I have tried two different chargers. Is there anything I can do? I really want the photos off of it. That s the main thing I care about.

Hi so two possibilities either the charger made a cheap as chips or you need a new battery.