The flange must be well anchored to the floor, then the flange bolts must be held into the ring on the flange to hold the toilet. Either the flange is broken or the bolts came out of the slots or the bolts just rusted out (use brass or SS next time), or you would not be able to rotate the toilet. In either case, movement of a toilet after you set it will break the wax seal and allow a leak.
You may need a repair ring for the flange, or it just may not have been screwed down in the first place. Or, you may need to replace the riser and put a new flange on. Hard to tell without seeing it.
Ideally, the flange is installed on TOP of the finished floor, and anchored down through the it into the subflooring. This provides the toilet with a well supported, and anchored flange that will hold the toilet and allow a seal to be robust.
You may find the floor rotten, and may be in for a major repair. If the floor is intact, it will eventually dry out if you can fix the toilet flange and get a good seal to stop adding moisture to the subflooring.