You're trying to install a Compaq WinXP OS CD onto a Packard Bell PC?
That isn't going to work, most likely some crappy protection thing these OEM builders have a fetish about.
Having said that however... looks like you got somewhere...
forgot to add that I put in the Windows XP CD, I formatted and installed Windows XP on it, it rebooted then took me back to the installing screen for XP, I formatted again, hoping it will now work but it didn't.
Umm... you did remember to change the BIOS after installing WinXP right? Remember, WinXP requires boot to CD first, once you install it, change the BIOS so that it boots from the HDD first, otherwise if it keeps booting from the CD first you keep getting WinXP install screen.
Also, I don't think Fdisk is the issue, if you managed to get winXP installed onto it, then you don't need to format, even then, if you did need to format the HDD, WinXP would prompt you to do so.