A novel recyclable sensor Q2 for relay recognition of Cu2+ and H2PO4− in colorimetric and fluorescent response. Taking advantage of high sensitivity and selectivity response towards Cu2+ and H2PO4− over other metal ions and anions. The actual usage of sensor Q2 was further demonstrated by test kits and silica gel plates. The fluorescence changes of Q2 upon the addition of Cu2+ and H2PO4− were utilized as an INHIBIT logic gate at the molecular level.