Itunes Library Transfer Problem?

Last week I broke my laptop, which had my complete iTunes library. Now I have to use the home computer but when I try to transfer all my music from my iPhone to the my new library, only the music I purchased from ITunes will sync. My old iTunes library was on an older version of iTunes, while this one is up to date. There's a tab that says "on this iPhone" that shows all my apps and music but for some reason it won't transfer to my current iTunes library. Is there anything I can do to get my iPhones information to transfer to this new library?
Thanks

Addition Information
I have a 4th generation IPhone
This computer has no other iTunes libraries on it

For the music not from iTunes store. You need to use some third party software to copy the music from iPhone back to computer. And here is a step by step guide how to transfer iPod/iPhone music. Hope it helps you.

  • Transfer Music On Iphone To Itunes Library? I have almost 800 songs on my itunes library, and around 1000 songs on my iphone. I don't know what songs are missing from my itunes library, and really don't want to manually do it. (I'm transferring iphone music to Ipod). Is there any way to copy my iphone music to my itunes library? Thanks! PS. I have an Iphone 4 If I need some type of software, please cite it and include download link if possible.
  • Transfer iTunes library to a different account on the same computer? My mum hates that my siblings and I put all of our music in her iTunes library because we don't have a computer of our own. I just created a new account on her computer (MacBook Pro) for us, but I can't seem to transfer our songs to that account. Every time I try to transfer the songs from my iPhone (same songs as on my mum's iTunes), it says that they've been transferred but the library stays empty. Any suggestions?
  • IPhone, iTunes Library Problem I have a new iPhone 4S. It has no music or anything. However my old iPhone had 750 songs on it, and most of the songs are on iTunes. I would like to put all my songs from my old iPhone, into a playlist in my iTunes Library. However when i plug my old 3GS into iTunes, it won't let me drag songs into the library?
  • I'm not able to transfer music from ITunes Library to IPhone 4? I have only recently bought IPhone 4, I have also done sync, but I'm not able to transfer. I have transferred songs from my PC to ITunes but from there I'm not able to transfer it to phone Pl.guide step by step thanks in advance