restore the phone plug into i tunes and hold the power button and the home button down till itunes says that it has found a phone in restore mode then follow the on screnn prompts.
at least your phone was only locked, I did the same thing to mine and now will not come on period. i will not do any more restores on your phone. take it into apple store. my phone is now bricked, the apple store says it is a hardware problem and now i am out of luck. will have to shell out $400 big ones to get a new phone.
all that plug it in and hold down the start and power keys routine cannot get my phone back on. hope you get more luck that i did.
chow
Yobleek.