With a recent wind storm, most of backyard fence fell over in the adjoining school yard. The fence posts were set in dirt I believe and snapped; we didn't build the fence...
In the past, I have used a product like the Simpson Strong-Tie E-Z Spike. It's not cheap nor easy to drive in. I was considering using the E-Z Mender instead and pouring in some fast setting concrete as well to a depth about 18-24" around each broken post. I'm look at about a $200 repair in materials alone for five posts, so I am a bit cautious at doing this.
I'm going through the same thing with a similar fence in a similar setting. There appear to be three options:
Attempt to repair the existing posts. Pros: straightforward. Cons: expensive and you risk having to redo everything within a short time when another part of the posts rots out. Could be ugly looking, too.
Yank the broken posts and replace them. This requires detaching the panels from the posts (they're usually nailed or screwed on), digging out the remains of the post, setting new posts, and re-attaching the panels. Pros: Costs are minimal--you pay for the replacement 4 by 4s plus a few nails or screws. Cons: Digging out a well-set post (especially if concrete was poured around it) is time- and labor-intensive.
Replace the broken fence. Do this by removing all panels between the extremal good posts. Minimize the damage and save the panels. Cover up the remains of the broken posts (after cutting them off below ground level if need be). Buy one more post than you lost. Set new posts where the middles of the panels used to be: this should be virgin territory, so it's no harder than starting a new fence. Cut one of the panels in half: use the two pieces to span the short stretches at the ends. Put the other panels in place. Pros: Costs are low, not much higher than option #2. Cons: you wind up with two short panels along the fence. (You can choose where they are located, perhaps putting them behind existing bushes.)
I have been doing a combination of #2 and #3. My strategy is #3 (so that replacement posts go into new holes), but I was forced into using #2 when a post I thought was still good broke off in the middle of an otherwise competent stretch of fence. It was easier to yank the old one than to cut a couple panels and put two new posts in. Incidentally, I'm re-using fence materials (posts and replacement panels) from another location (obtained free) because the remaining fence isn't going to last long anyway. (Total cost for all repairs: a few dollars for a box of screws and some 10d nails.) There's little sense in using new, costly materials to repair an installation that will need a complete replacement in a few years. Yours looks like it's in similar shape.
Are you thinking of just cutting off the damaged posts and reusing them? I would think they are too rotted to reuse. I have used similar products for posts but did not have much success unless it was a open design fence like a spaced picket or rail type and 4ft tall. The fence appears to be about 6 ft. tall and with the closed design the wind load may be too much. Read the answers in the should I set my fence posts in dirt,gravel,rock etc. question.