Concrete is the best possible foundation for your toilet, assuming you have no need to move that toilet for many years to come. It's forgiving when it comes to water spills, and it won't rot or attract termites. Don't be intimidated if you've never set a toilet flange in concrete. Most importantly, start with the end in mind; know exactly where you want the toilet flange to be positioned, and don't forget that the top of the flange needs to be about 1/2-inch above the finished floor (not the subfloor).
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.