Chip away any existing concrete that prevents you from joining the toilet flange to the sewer pipe. Calculate where the sewer pipe must end in order that the top of the toilet flange will be positioned 1/2-inch above the finished floor.
Extend the existing sewer pipe, if necessary, by adding a pipe coupling and PVC pipe. Brace the pipe into position, if necessary, with wire attached to nails pounded into the area below the concrete surface.
Attach the toilet flange to the top of the pipe with PVC cement. Pour new concrete around the flange, leaving a gap below the flange for the tile, hardwood or other floor covering (if applicable). Slide the 2 toilet mounting bolts into the slots in the toilet flange. Allow the concrete to dry.