You use your backup copy of your computer to put everything back on the hard drive, then sync.
The iphone is not a backup/storage device. It simply mirrors the selected content of your computer. It will sync with one computer/library at a time. Syncing to another will erase the current content and replace with the content from the new computer/library.
No backup? Not good.
Go to the store and buy yourself an external USB hard drive that's big enough to back up your Mac. They're cheap. Then turn on Time Machine. I just hope you didn't have anything really important on your computer.
As for how to deal with the phone now, see this article: https://discussions.apple.com/docs/DOC-3141