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
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.
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.