I tried putting my hard drive onto a new laptop of the same type, Windows XP Professional, and I cannot get internet on it no matter what I do.
But it works on my old computer, which is also Windows XP Professional, so I'm using it currently.
Your problem is that you cannot just take a hard drive out of one computer, stick it into another, and expect the second one to work. Even if they are of the same model it is likely that there are hardware differences which will require different drivers. Having the same operating system is not paricularly relevant to this situation - it's the match up between the registry, the hardware and the necessary drivers.
If you need a hard drive for this other computer, you would find it much easier to buy a new hard drive and re-install the sytem onto the new drive. As an alternative, if the second laptop has a recovery partition, you could try using that on its own hard drive. But if the hard drive from the second computer is broken, then a new hard drive and rebuild is the answer. You won't need to buy a new copy of the OS so long as you have the original activation number.