Contour97 gave a good description.
One thing you do NOT want to do is lengthen the wires, unless you can tie them into a bundle that stays in the shaft (as I did). The reason I say this is because if you extend the wires and reinstall your shifter, the new length will get the wires caught in the plastic assembly towards the floor when you shift from reverse to drive and so forth.
If your wires disconnected at the soldered point on the button itself.. that IS an issue, and I have no expertise going there. The plastic shifter iirc doesnt come apart easily, at least from when I tinkered with mine. My advice would be to pull one from a bone yard for a couple bucks; you can snip almost all the wire with it, too, so that you have some slack in case it ever happens again.
One last thing. Use 3M brand splice connectors and wrap them with electrical tape when you're done. Reason I say this is because somehow my splice connectors grounded onto my car and shorted the entire car out in a very very busy intersection. I was not happy to be dodging cars as I pushed mine through the intersection

Hope this helps some.
-Bill