Chosen Solution

My iPhone keeps turning on and off repeatedly and won’t even give me enough time to type my passcode before turning off again and it’s been doing the same thing for a couple of hours and it’s driving me mental and I haven’t really got access to a computer does anyone know what to do?????

maria alkozi, sounds like a battery error. Replace the battery and then try. Use this guide

This is called a “boot loop”, and has a number of causes. Usually this can be fixed by doing a “hard reset”: Press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo, release and it should boot normally.