This question already has an answer here:
I have just attempted to update my iPhone 4 to iOS 7. The phone switched itself off after a while and now the phone won't work any more. The screen switched back on with the logo of iTunes and the charger with an arrow pointing to the iTunes logo.
I connected the phone to my Mac and it doesn't recognise my phone at all, asking to restore it to the factory setting. If I do that, would I lose everything on it?