I tried connecting it to itunes at home and it tried restoring it but it didnt work it gave some error. I tried again the next day but then it didnt read it even with pushing the home screen and the button on the top of the phone but didnt work.
What's exactly is the error that show's when you try to restore it? You can try putting it into recovery mode by turning it off then hold the home button for about 4 sceonds and plug it into the cable. A screen should pop up that says connect to iTunes. That should help with restoring the device. If not try following ts1456. Also make sure your iTunes is up to date and any security software programs are turned off if you are on a windows computer.