full email id passing in url

前端 未结 2 835
自闭症患者
自闭症患者 2021-01-17 08:09

i am new to php .i am trying to develop a application with html and php. i passed variable from form to url.all code given below

相关标签:
2条回答
  • 2021-01-17 08:30

    You are simply seeing certain characters encoded to be URL safe (like @).

    When you examine the data server-side it will look like the original data on the form. You don't have to decode anything, PHP does it for you automatically.

    From the docs:

    The superglobals $_GET and $_REQUEST are already decoded.

    Try to echo $_GET['email'] in PHP and you'll see xyz@abc.com again.

    0 讨论(0)
  • 2021-01-17 08:40

    Urls are encoded, that's why @ becomes %40, it comes from the way data is sent from the form/ If you use get method, this is how it will be formated in the url. But don't worry, what you get in php is correct and decoded.

    0 讨论(0)
提交回复
热议问题