Last night i went to bed, and my iPhone was pefectly ok, working etc. But when i awoke this morning it wasn't switched on so i thought oh the battery must of died so i put it on charge and it didnt come on, so i tried recovery mode and it went to the emergency calls only thing. But when i plug it into the wall socket it comes on, and then goes off sometimes. as soon as i take it off the wall socket plug it goes off straight away. but when i go on the pc and plug it into the usb it doesnt get the past the apple logo, it keeps restarting all of the time, so it seems like a hardware failure, as it looks like its stuck in a loop.