How to obtain anchor part of URL after # in php

后端 未结 4 1375
花落未央
花落未央 2020-12-02 01:13

While using LightBox mechanism in my project I got an URL http://nhs/search-panel.php#?patientid=2 I need to collect that patientid from this through GET mechanism, Is that

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 01:45

    Maybe everybody else is right and a simple $_GET is enough but if the # in your URL ( http://nhs/search-panel.php#?patientid=2 ) is supposed to be there you would have to do that with JavaScript (and Ajax e.g. JQuery) because everything after # is not included in the request as far as I know.

提交回复
热议问题