a URL ending with something like portal.php?key2=hello how can I get the value of "key2"?
3 Answers
var_dump( $_GET['key2'] );
2 Comments
meder omuraliev
var_dump is like a more informative version of echo used solely for debugging. So even if it was blank it would display something.
GET data is decoded into the $_GET super-global array. See http://php.net/manual/en/language.variables.external.php