How can I permanently delete all of my personal information from my old iPhone 3G before I give it to somebody else?
Tap the Settings icon on its Home screen. On the Settings screen, tap General and then scroll down to the Reset option at the bottom of the screen. Tap the Reset area with your finger.
On the Reset screen — which also lets you do things like reset just your network settings or your Home screen layout — you will find the “Erase All Content and Settings” option. Tap that to get started.
The iPhone thoroughly wipes the data area of its memory; Depending on the amount of storage your iPhone has, it could take one to four hours to erase all the content.
To make sure the iPhone’s battery doesn’t conk out during this process, keep it connected to a power source for the duration of the erasing.