Jump to content

variables in the URL


aussiefly

Recommended Posts

hi guys,

 

i'm putting together a little referrer script for my site and I was just wondering if there is some simply way to 'grab' the variables listed in a URL.

 

So for instance if a client was sending people to

www.somerandomURL.com?refer=101

 

is there a way that when a new member then registers i can grab that account no out of the URL and store it in a variable for later use??

Link to comment
https://forums.phpfreaks.com/topic/93098-variables-in-the-url/
Share on other sites

If you are trying to find out which variables are available you might try:

 

$vars = array_keys($_GET);

 

Though you may want to use $_REQUEST to include both GET and POST requests.

 

You also have $_SERVER['QUERY_STRING'] which contains the, well, query string.

Link to comment
https://forums.phpfreaks.com/topic/93098-variables-in-the-url/#findComment-476958
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.