this started about a week ago. my initial thought was the battery so i brought a new one and fitted it (i am a fairly good electrician and techy afterall). however this didnt fix the issue. i did a little research and a few people were saying that they were having this trouble with ios 5.0.1 and that upgrading to ios 5.1 seemed to fix it, so i tried that but it seemed to make it worse. the phone starts up and i can use it for about a minute or 2 but then it turns itself off and back on again. i'v tried a number of different things like cleaning the power button, fully restoring it, but nothing seems to work. its an iphone 3gs btw.
After 1 to 2 minutes, all regular processes should have loaded, but the internals are still warming up so it could be a hardware / thermal expansion / connection issue. Why not sell it as broke on eBay and upgrade?
I've seen this with a few devices people have brought in (specifically the 3GS) - unfortunately it normally ends up being a logic board issue.
First and foremost, make sure everything has a secure connection to the logic board. Sometimes a component being not secured completely can cause this. Another culprit you may want to consider is the dock connector assembly. If it's not receiving a proper charge or it's malfunctioning, it can cause the battery to read wrong.
If none of that works, I'd say the logic board is going bad.
my iPhone 4 just randomly turned off but when i put it in the charger it was 100% battery life, however it was back to its default settings and set-up, does this mean i have lost everything? and it wont let me do anything, if you know what to do that would be great,