Q: My iPhone screen is smashed and I cannot unlock it again. I want to back the phone up but it says I need to unlock it with a passcode first. Is there any way of sorting this out?

– Patrick
A: If you’ve normally backed up your iPhone to a specific computer in the past, you should still be able to make a backup to that computer without unlocking the iPhone first. The passcode restriction is designed to prevent your iPhone from being backed up to an unknown iTunes library, as a security feature against your information being accessed by anybody else who may get their hands on your iPhone. So if you have more than one computer running iTunes, you should try backing up your iPhone on the other machines.
Also, if you’ve been using iCloud you should already have a backup stored there from within the past 24 hours, assuming your iPhone has been on Wi-Fi and plugged into a power source during that time. If your iPhone is still functioning internally and the issue is only damage to the touchscreen, then you may be able to plug it in and wait for another iCloud backup to be made. This process runs in the background regardless of whether the phone is locked with a passcode or not, and in fact requires the screen to be off in order to run.
You can check the status of your iCloud backups from a Mac or other iOS device by going into your iCloud settings. On Mac OS X Lion or Mountain Lion, go to System Preferences and select the iCloud section and then click the “Manage” button in the bottom right corner. A list of all of your data stored in iCloud will be shown on the left hand side with Backups as the first entry; selecting this should show you the backups of all of your iOS devices and the date and time the last one was made.
The same information can also be seen from another iOS device connected to the same iCloud account by going into the iCloud section of the iOS Settings app, choosing Storage & Backups and Manage Storage. Tapping on an individual device will show you the date of the last backup for that device.

If all else fails and you can’t find an existing backup or make a new one, you may be able to get some help from an Apple Store. It’s unclear whether they have the tools to override this restriction, but you can certainly ask.