0

I'm having some trouble receiving information through $_GET[' ']. I send a request to a PHP document, like this

procura_plano.php?plano='+plano+'&operadora='+operadora+'&contrato='+contrato+'&idade='+idade+'&acomo='+acomodacao+'&valor='+valor

because I'm using javascript to make the request. But the last value seems not to be set. Is there a limit of parameters that I can pass through the link?

Sorry for my english :/

chris85
  • 23,846
  • 7
  • 34
  • 51
  • 7
    possible duplicate of [What is the maximum length of a URL in different browsers?](http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers) – Elon Than Sep 14 '15 at 17:51
  • unless those variables contain the text of War&Peace, that's not going to be a problem... – Marc B Sep 14 '15 at 17:53

1 Answers1

0

Please note that PHP setups with the suhosin patch installed will have a default limit of 512 characters for get parameters. Although bad practice, most browsers (including IE) supports URLs up to around 2000 characters, while Apache has a default of 8000.

To add support for long parameters with suhosin, add suhosin.get.max_value_length = <limit> in php.ini

For More info check this link or URL parameters- Stack Overflow

What w3 Schools say is: Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters)

Check this, GET URL Parameters- w3 Schools

Nana Partykar
  • 10,556
  • 10
  • 48
  • 77