My IPhone was on 20% last night and I immediately plugged it in to the wall, it continuously kept connecting and disconnecting and at times giving "Charging is not supported with this accessory". Today, when I woke up, I noticed that my phone was off. I tried to charge it, I used 2 different chargers, I tried it with USB and plug. I know it turns on because when I hold the button There is an image of a battery with the thing.
that's a tough one and could be an issue with a bad battery or something wrong with the "charging circuitry" in the phone itself which would require a visit to the Genius Bar or a 3rd party phone repair shop.
One thing you might want to try before going that route is to plug it into the Mac or PC that you normally sync with. Does it give you that same error? If so it may be that there is an issue with the connector. Either in the phone itself or the dock connector. You can try blowing in there to dislodge any lint/dust/dirt but a quick spurt of canned air would be my recommended method. Do both the connection port on the phone and the dock end of the connector and try again.
It is possible that the connector is worn and jiggling the connector in various ways might point to that.
When the phone is in this state (extremely weak battery), it doesn't respond immediately even if it is charging. If it's charging, it'll take several minutes to have enough charge to even display that it's charging. So plug it in and be patient. Most likely, that's all you need to do in this case.
(Using a known good charger and cable is also a good idea - that is, that currently work with another device. It could be something else, like the battery itself, but less likely. )