How to install closet flange? Existing had nails (rusted out)

I had a loose toliet, I thought the bolts were bad....
I have a PVC type closet flange that was simply nailed to the subfloor. The nails rusted and there is nothing holding the flange to the floor.
So I poped the flange up, and the flange was never really installed to the drain pipe.
The flange has a rubber ring which looked like it would engage the plumbing.
The brand of this system is Canplas Industries. I am trying to find a photo online...
But maybe this is a standard type system?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

From what I can tell looking at the pictures, it looks like a standard PVC closet flange, with a wax seal that had a rubber "funnel" or "horn". Both are fairly standard items you could pick up at any home center.
The only thing that concerns me is the flange is usually an intregral part of the drain, or snap together with tabs so the drain stays attached to the flange. While you could screw the flange back down, I would worry about the drain pipe sagging and the potential for leaks under the floor you may not discover for a while.
Do you have access to the piping under the floor? If so, I would be tempted to replace the flange and piping back to a point you can make a secure connection. If not, I would see if I could clean up the pipe and somehow glue the flange to the pipe with PVC cleaner and cement. Again, I can't tell for sure how it all fits together from the photos.
In general, I would just line up the bolt slots so the bolts can be parallel to the wall, then use stainless steel screws to screw the flange to the floor. Then install a new wax ring, with the rubber horn if you wish, and install the toilet. Also, the flange should sit on top of the flooring, and I can't tell from your photo if it is recessed flush with the floor? If so, you might want to find a "tall" wax ring, or double-up wax rings to ensure a tight seal.
Anthony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.