I have either an URL like this: http://url.com/test.html?var1?var2 or like this: http://url.com/test.html?var2
how can I, using php always extract var2? meaning $variable = var2.
Please note that somehow the server I’m working on doesn’t support $_GET. It just doesn’t work.
thank you for your kind help 🙂
EDIT: after using print_r($_GET) on this url: http://xxxxxx.com/partners/?page_id=1012?selectuser=1 I get: Array ( [page_id] => 1012?selectuser=1 )
but when i do an <?php echo $_GET['selectuser']; ?> nothing gets echoed…
EDIT 2: doing an <?php var_dump($_GET['selectuser']); ?> on http://xxxxxx.com/partners/?page_id=1012?selectuser=1 I get NULL
Incorrect:
Correct:
Get your urls in order first, then try $_GET.
— Edit —
Not sure what you mean by “Please note that somehow the server I’m working on doesn’t support $_GET. It just doesn’t work.” The following should work:
And if $_GET doesn’t work, try $_REQUEST.