An optical sensor for mercuric ion based on immobilization of Rhodamine B derivative in PVC membrane.