Iphone 4 says charging not supported accessory?

Ahhhhh whats happening, first it came up with this and kept flickering on and off charging and now it wont charge at all… What can i do to fix it? Please help

Use original apple charger or dock

This happens with my cords all the time, it could be worn out. Try bending it different ways, the laying the iPhone down so it's pressures the cord down. I'm doing this with my phone, I usually wait till it's not working to buy a replacement. If that doesn't work, just go buy a new one: p

Sometimes just unplugging it and plugging back in works… Happens to me sometimes probably because I use a generic cable. If it continues I guess you should switch out the cord…