skip to Main Content

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


  1. Chosen as BEST ANSWER

    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


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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search