Acrylamide monomers and polymers that contain phosphonate ions