Why was all my music erased on my iPhone?

I hooked up my iphone to a different computer with a different account on it to itunes and downloaded a few songs from it. When it was done downloading, all but 2 albums were gone and no longer on my phone. I don't remember the account that was used to get the other music and i don't know how else to get the music back on my phone. Is there anything i can do to get the music and get everything back to normal?

Sounds like you gifted your friend with some music. Unfortunately, there's no way to transfer the media between different accounts. Just get the torrent.

Okay, here's what you can do to get your music back;
1; open iTunes on your own computer

Unless the songs were from the iTunes store which in that case you can redownload them from the app on you device by going the iTunes app and downloads and it has to be the same account that bought the songs. If there just were from cd's than there gone sorry. I have 1 question. Have you synced and backed up your iPhone recently. If so go back to the computer with all your music on it and resync all your music. If you didn't have you music stored anywhere and they were from a cd they are gone.

Tip: It's a good idea to sync back your iPhone up regularly to prevent this from happening again. If not for future references drag 2 albums to your account manually by checking the transfer manually when you click your device in iTunes. If you purchased everything in iTunes it's all there. If you aren't sure what to do in the future go to my account page and you'll see where you can contact me.