Unscrew the knob plate from either side of the door that holds the doorknobs in place.
Turn the doorknobs to the left to unscrew them from the spindle. Set the knobs and plates aside.
Examine the spindle inside the door. If the latch mechanism has come loose from it, reattach it to the spindle. If the spindle is broken, remove the latch from it and pull the spindle out of the door.
Place a new spindle in the door and clip the latch over the center of the spindle so it will move when the doorknobs turn.
Slip the plates over the open ends of the spindle. Twist the doorknobs back onto the spindle until they are tight. Turn the knob to be sure the spindle is working.