might be a little late, but with the trains you can book through here:
http://www.renfe.com/
that's the official Spanish site for train tickets. You can also buy the discounted student tickets through it.
You'll need to run it through google translate if you're spanish isn't quite up to scratch but it's generally pretty easy to figure out.
have fun!