2 things to try.
First, reset your phone by holding down the Sleep and Home buttons at the same time until the Apple logo appears, then release both buttons. Wait for the phone to restart, then try your wifi again.
If that didn't work, try resetting your home wifi. Just switch it of for a couple of minutes then restart it. Does wifi work now ?
it still didn't work. about the restarting, i tried it but still no progress. restarting the router might not work because even wherever i go, i can't connect to the wi-fi. like in our school, i can't connect and most of the time, even i'm in a wi-fi zone, my device isn't showing whatever wi-fi connection it searches.