This solution has been voted best by the Fixya Commnunity
Here are your instructions from the website below.
Reset your iPhone Passcode:
If you have forgotten your iPhone's Passcode you will need to restore your phone via iTunes.
But first you have to put your phone into the restore mode which is a slightly fiddly process.
Plug your iPhone into your PC or Mac with the USB cable
Press and hold the power button at the top and then slide to power off the iPhone
Press the power button to power the iPhone on and keep it held while simultaneously pressing the home button
After a few seconds a yellow alert triangle will appear and the iPhone will say it is iPhone Restore Mode.
Open up iTunes and click on the Summary tab
Click on Restore to restore your iPhone. This will reset all your iPhone's setting to the factory defaults, including the Passcode. You should then follow the steps above to activate the Passcode with a memorable number http://www.knowyourmobile.com/appleiphone/apple_iphone_userguides/4684/how_to_password_protect_your_iphone.html Click on this link or copy and paste the complete link into your browser.
If I could be of further assistance, let me know. If this helps or solves the issue, please rate it.
Disabled iPhones are caused by entering an incorrect passcode for several times. Restoring your device thru iTunes will not work coz iTunes recognizes that your device is currently passcode-locked. To bypass this passcode-lock and proceed to restoring your device, you must put the device to DFU mode first. And you can learn about putting your device to DFU mode by following this link:
For more iPhone / iPod touch tips like jailbreaking and unlocking, click here.
If you need online help about jailbreaking and unlocking, you can contact me personally at this email: email@example.com
my iphone was disabled to "connect to itunes". i connected it to itunes but it needs a passcode that needs to keyed in...