Dell-laptop not recognizing cd in drive

Press it's "eject" button to see if the tray opens. If it doesn't, make sure it has not become partially disconnected by making sure that the drive is not sticking out proud of the laptop's edge. If it is, give it a firm push until it's flush with the edge.

I've seen that happen twice on laptops that friends have brought to me for fixing.
A firm push on the drive was all that was needed.