Page 1 of 1

reading a variable

Posted: Wed Mar 24, 2004 5:12 pm
by Vince
Hi,

I am wanting to do something like this:

http://mydomain.com/?advertiser

This is going to be for an affilliate program I am designing. Each affilliate will have a different link.

I am wondering though, how would I use the ?advertiser part in my code?

Since the ?advertiser could be almost anything I can not use the regular old
$variable = $_POST['variable'];

Because I don't know the name of the variable.

I know there is a way to do this, I have seen it done before. I just can't find it on the forums or by searching google.

Any help would be appreciated.

Vince

Posted: Wed Mar 24, 2004 5:19 pm
by markl999
if(!empty($_GET)){
echo key($_GET);
}

??

thanks

Posted: Wed Mar 24, 2004 5:25 pm
by Vince
Thank You, Thank You, Thank You.....

Ok this was bugging me all day. I was really trying to figure it out myself before posting. That's why I am so overjoyed to have it figured out!

Vince