Page 1 of 1

globals

Posted: Thu Aug 08, 2002 9:23 pm
by learning_php_mysql
uhh i need some help... i want to pass variables through urls then have a switch statement that includes files depending on the 'page id' but what's the global for getting variables out of the address bar?
is it like $HTTP_POST_VARS[""] or $HTTP_COOKIES_VARS[""] ?

thanks

Posted: Fri Aug 09, 2002 12:00 am
by protokol
$HTTP_GET_VARS[]

Posted: Fri Aug 09, 2002 12:22 am
by learning_php_mysql
cool, thanks a ton

Posted: Fri Aug 09, 2002 2:32 am
by twigletmac
$_GET, if you're using PHP 4.1 or above.

Here's the rest of them: http://www.php.net/manual/en/language.v ... efined.php

Mac

Posted: Fri Aug 09, 2002 1:07 pm
by protokol
using $HTTP_*_VARS will work with any version of PHP though

Posted: Fri Aug 09, 2002 1:08 pm
by hob_goblin
they are being deprecated though, due to the fact they take a while to type and the fact that they are not autoglobals

Posted: Fri Aug 09, 2002 5:27 pm
by learning_php_mysql
twigletmac wrote:$_GET, if you're using PHP 4.1 or above.

Here's the rest of them: http://www.php.net/manual/en/language.v ... efined.php

Mac
thanks this is a really usefull page

Posted: Sat Aug 10, 2002 5:18 am
by twigletmac
protokol wrote:using $HTTP_*_VARS will work with any version of PHP though
Which isn't important if you're coding just for yourself and using PHP 4.1 or greater - and make sure you've got a host with the same. If you're writing scripts to share it's definitely an issue you should think about.

Mac