Page 1 of 1

Cannot access ID's in URL ($_GET)

Posted: Fri Dec 06, 2002 9:56 pm
by imroue
for example:
http://www.mysite.com/index.php?id=3241

I want to access the "id".

so I do this:
$idIn = $_GET['id'];
echo "$idIn";
BUT since "www.mysite.com" is actually a forwarded URL.
Basically (for example)
http://www.mysite.com
is forwarded to:
http://123.123.123.123

I do not get the ID. It returns Undefined index: id

--Global Variables = ON in my php.ini

ANY IDEAS
:(

Posted: Fri Dec 06, 2002 11:12 pm
by qiangxd
i don't understand your means
you can give a try

$HTTP_GET_VARS['id']

Posted: Sat Dec 07, 2002 1:04 am
by mydimension
nope, $_GET is correct, provided you are using php version >4.1.x

now, when you say forwarded, do you mean the actual address in the browser address bar changes or do you use that url redirection service that masks the original url (commonly used to direct to free hosting services with long urls)?

Posted: Sat Dec 07, 2002 1:10 pm
by f1nutter
If you have control over the redirection, don't forget to append the query to the file at the new URL.