It sounds like your phone keeps unexpectedly restarting over and over. I would recommend these troubleshooting steps from the article named:
iPhone: Hardware troubleshooting
- Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
- Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIsand corrosion.
- Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
- After at least 30 minutes, if:
- The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen . Then unplug the phone from power. If it immediately turns off, seek service.
- The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
- Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
- If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
- If the display turns on, go to step 4.
- If the display remains black, go to next step.
- Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
- If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
Thank you for using Apple Support Communities.
Hi Tchris Tbg
l have the same problem as yours, My iPhone 5 Was working great till yesterday when the percentage of the battery won't pass over 1 percent, after that it went off and won't turn on again. I'm sure my charger and my cable all functioning properly but I dont know what's wrong.
please if you find what's wrong with your iphone share it here, I might have the same problem.