0

I´ve got a problem, related to pass a var through a form via $_GET

For instance if I put an accent ó, it transforms to %3F%3F, and if I put an echo on my php file the var $_GET['buscador'] appears like this ??.

I´ve been searching informatio about how to resolve this issue, and in some sites say that I have to write in my file server.xml this part of code:

<Connector port="8080" maxHttpHeaderSize="8192"
      maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
      enableLookups="false" redirectPort="8443" acceptCount="100"
      connectionTimeout="20000" disableUploadTimeout="true"
      useBodyEncodingForURI="true" URIEncoding="UTF-8"/>

But it is not working at all, anybody knows how to solve this problem?

Thanks in advance.

fsw
  • 3,595
  • 3
  • 20
  • 34

1 Answers1

0

This is normal, GET parameters are encoded to meet standards. You should decode parameters once you receive them :

$var = urldecode($_GET['buscador']);

Note : You should also encode your URL properly before making requests (when doing them by code). For Java you can take a look here and for PHP here.

Community
  • 1
  • 1
Alexandre Lavoie
  • 8,711
  • 3
  • 31
  • 72