How to get parameters from a URL string?

前端 未结 13 1437
孤城傲影
孤城傲影 2020-11-22 04:05

I have a HTML form field $_POST[\"url\"] having some URL strings as the value. Example values are:

https://example.com/test/1234?email=xyz@test.com
         


        
13条回答
  •  隐瞒了意图╮
    2020-11-22 04:37

    All the parameters after ? can be accessed using $_GET array. So,

    echo $_GET['email'];
    

    will extract the emails from urls.

提交回复
热议问题