Preparation of the porphyrin-functionalized cotton fiber for the chromogenic detection and efficient adsorption of Cd2+ ions.