The little suction cup holders that come with razors are pretty awful. Even when the suction cup holds well, razors tend to slip out of them, usually just in time for you to step on them while you have one foot in the air trying to scrub between those toes.
Fortunately, The Family Handyman has a solution to this worrying problem. All you need is a bit of 1" (2.5cm) diameter PVC pipe, a hacksaw, and some zip ties. Just cut the pipe to length (about 3" (7.5cm) will do the trick) and then cut a couple of notches in the side to give the zip ties something to grab onto.
Secure it to a shower caddy, or whatever else is handy in your shower, and drop the razor in. Your feet will thank you, and so will whatever skin you'll be shaving with a razor that no longer has dented blades.
Razor holder [The Family Handyman]