The iPhone and other smartphones make it possible to be interconnected and synced up, so you do not have to fear losing information again if you engage in some preparation. Accidentally deleting a contact or group of contacts from your iPhone, or even losing or breaking your iPhone, does not mean that your contacts are gone for good. Given iTunes' ability to automatically create backups, you can use a recent backup to restore your iPhone contacts.
Open iTunes and connect your iPhone to your computer using the provided USB cable or your Wi-Fi connection. Wait until you see the iPhone icon appear in the left column of iTunes underneath the “Devices” category.
Select your iPhone and right-click it (Ctrl-click on a Mac) from the list of devices.
Select "Restore from Backup." iTunes displays your iPhone name as well as the most recent backup available. Click "Restore" to return your contacts to your iPhone.
Update your firmware, if necessary, as the backup does not include these updates.
It is highly recommended that you use some other form of backup for your important contact information as well. Soocial is a good, free program that will store your contacts online and can sync right from your iPhone through an iPhone app offered by the company.