|Have you, or is it possible someone else who has access to this laptop|
- dropped it, or otherwise subjected it to a physical jolt ?
- spilled liquid on it, or exposed it to liquid such as rain, or sprayed it with liquid ?
" After formatting and re installing windows xp,..."
People often try to re-install Windows when their problems are actually being caused by a failing hard drive.
Were you having problems before that you haven't told us about ?
If yes, tell us about those problems.
If the laptop's bios can't detect the hard drive, then no software can detect it, at least not when it's installed on this laptop.
Laptop hard drives never have a warranty longer than 3 years in any case.
How old is it ? (the laptop if it still has it's original hard drive, or the hard drive if it was replaced.)
The hard drive must spin when the computer is running . Does it ?
Place your ear close to it, or place something solid, such as a piece of wood, between the drive and your ear or your head next to your ear, so that you can hear whether it's spinning or not.
If it's a SATA drive, you don't need any special cables to connect it to a desktop computer that has SATA data headers. The SATA power and data socket on the laptop hard drive are exactly the same as on a desktop SATA hard drive.
If it's an IDE (EIDE) hard drive, you can buy an inexpensive laptop IDE to desktop IDE wiring header / adapter that will allow you to connect it to an IDE data cable and a drive power connector (it only needs +5v) on a desktop computer. If you live in a reasonably large place, that's available locally. They cost as liitle as $20 or less.
The drive has 4 pins on one end of the drive's data/power connector that has two pins for setting the drive to Slave, and two pins for setting the drive to Cable Select, by means of installing a tiny jumper on the two pins. The drive is set to Master when there is no tiny jumper on any of the 4 pins.
Laptops that can have only one hard drive installed in them never have the tiny jumper on the original hard drive, and new IDE laptop hard drives don't normally come with the jumper .
Laptops that can have two hard drives installed in them may need the first hard drive to be installed in a specific place, and if two hard drives are installed, at least one of them probably must have the tiny jumper installed on two pins.
Either way, don't attempt to boot the Windows installation from your hard drive on another computer. If the mboards have hardware (primarily main chipset chips) that are more than a little different, XP won't load all the way even when there's nothing wrong with the Windows installation. What you need to be determining is whether the hard drive works fine or not.
Either type of drive can be installed in a suitable SATA or IDE 2.5" (often labelled "Portable") hard drive enclosure and be connected via a USB cable to any computer that has USB ports. If you don't have one, if you live in a reasonably large place, they're available locally for as little as $30 or less. (The USB port or ports the drive is plugged into must be able to supply 500ma. The drive may not be detected when it's plugged into a port in an external USB hub.)
Usually the IDE enclosures require that the drive is set to master - no jumper on any of the 4 pins on the drive.
You can't load Windows XP from a regular XP installation on a removable drive, such as an external hard drive, in any case, due to Microsoft defaults.