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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.