How to put the songs on my iPad onto the library an then onto my new iPhone?

I just got a new iPhone 4 and I also have an iPad, which contains all of the movies and songs I've ever had, but they were't added onto my computer's library? I plugged in my iPad and tried to put all the stuff I had on there into the library but it doesn't work? Also I don't know how to get the songs onto my new iPhone? Could someone please help? I really don't know too much about technology

"I also have an iPad, which contains all of the movies and songs I've ever had, but they were't added onto my computer's library"

Why would you have media on your iPad but not on your computer when you don't know how to copy from your iPad?

"I plugged in my iPad and tried to put all the stuff I had on there into the library but it doesn't work"

It's not supposed to. Apple iOS devices have never allowed that; That's been a feature of them for years. Apple made it that way to encourage to buy songs on iTunes. Also nobody would buy on iTunes if songs could easily be copied from an iPad to your computer. Yet every day brings people to this site having heard of it only now. If the songs on the iPad were purchased on iTunes then you can download thme from your account to your authorized computer using "transfer purchases"