Those notches at the sides of the flange are designed to slide a bolt into. You may have to dig out some crud underneath it in order to slide in the head.
Nearly all modern toilets use those bolts exclusively to hold the toilet in place.
Most toilets are designed for 12" from those notches to the finished wall (doesn't count the floor moulding if it exists). Many will work with something less than 12", but you need to check the manufacturer's instructions and drawings.