Over the last 3 or 4 weeks I've been having problems with my iphone 3gs. It is related to the battery but I'm not sure exactly what. When it gets to about 65% battery, it just switches off - it will back on but then switches off again as soon as you try to do anything e.g. take a photo. If you plug it into the mains power it's fine.
I have tried resetting certain settings and functions but it doesn't make any difference.
Yesterday in desperation, I restored factory settings but then backed it up from iTunes. It's made no difference. I think I should have configured it as a new phone. So I'm going to try that tonight.
In the meantime I'm using my original iphone which I still like the best although it has limited functionality but I love the handset.