Im trying to get a url param value with symbols in php string
&value=xdz_#*
$val = $_GET[‘value’];
$val = urldecode($_GET[‘value’]);
This ones always returns the value without the symbols #* like: xdz_
any sugestion will be appreciated
Im trying to get a url param value with symbols in php string
&value=xdz_#*
$val = $_GET[‘value’];
$val = urldecode($_GET[‘value’]);
This ones always returns the value without the symbols #* like: xdz_
any sugestion will be appreciated
2
Answers
the solution was encoding the parameter to the url, i do it in csharp and is like this
string value_encoded = HttpUtility.UrlEncode(value);
then when i write the url:
&value=value_encoded
Extracting from my previous comment that brought the answer:
Your URL should be properly URL encoded. Those symbols are not a problem when the encoded is correct.