You can restore the iPhone from backup on the last computer your iPhone synced with, this will allow you to reset the passcode http://support.apple.com/kb/HT1414. If you do not have access to the last computer the phone synced with, you will have to force the phone into recovery mode & restore as a new device, all data on the phone will be erased http://support.apple.com/kb/HT1808.
1. Turn off your iPhone/
2. Plug the Sync cable to your computer
3. Plug in the sync cable to your iPhone while holding the "Home" button.
4. iTunes should say "Found a Device on Recovery".
5. Restore your iPhone
6. If you have a backup of your device, then you should be good to go or else you will have start as a new device