You'll be fine as long as your new PC has the right connector. It's likely that the old DVD drive is a Parallel ATA ("IDE") one (if you're not sure, it'll have a big flat cable about 5cm/2in wide plugged into the back if it's a PATA one). Most new motherboards these days only have SATA ports; if this is the case, you're out of luck (but DVD drives are so cheap that it's no major loss).