Is it possible to use this in PHP 4.1.1
Or should it be renamed toPHP Code:$_GET["id"];
PHP Code:$GET["id"];
Printable View
Is it possible to use this in PHP 4.1.1
Or should it be renamed toPHP Code:$_GET["id"];
PHP Code:$GET["id"];
For strict 4.1, it should be w/o the underline.
If it's possible that it may also run on an older version of PHP, then you might want to leave it in.
:confused:
I didn't even know there was a $GET. I thought all the super globals had the $_ prefix to them. And what is strict 4.1? :confused:
And it wouldn't run on an earlier version, because the superglobals didn't exist on earlier versions. They were implemented in 4.1, and fully addressed in 4.2
Prior to that, either you used the variable name (such as $id) or used $HTTP_GET_VARS['id'] or whatever it was.
...this whole thread just confuses me...
sunnuva....... you're right..... now that you mentioned it, I don't see how $GET would work..... other than simply geing just another variable....
what I meant by "strict" was that one way was left for degradation purposes, but that the new way works better/safer/and is recommended. Also not all hosts allow superglobals (mine #$%)$# host included) ...
Oh. I gotcha :)
Your host doesn't allow superglobals!? Do you have to use just like $id (register_globals on)?
Man. That's like backwards. PHP recomments register_globals off (and is by default) and praises the use of the superglobals.
That's just crazy! :( :p
if you can't useQuote:
Originally posted by Chrissie
Is it possible to use this in PHP 4.1.1
Or should it be renamed toPHP Code:$_GET["id"];
PHP Code:$GET["id"];
then you can usePHP Code:$_GET["id"];
but that is not an autoglobalPHP Code:$HTTP_GET_VARS["id"];
also, if you have register_globals on you should still be able to use the superglobals.
Yeah my mistake it shouldn't be $Get but
$HTTP_GET_VARS
But 4.1.1 does not allow $_GET is that true?
I thought it had, but it might be 4.1.2 that they started with it, or something later.Quote:
Originally posted by Chrissie
Yeah my mistake it shouldn't be $Get but
$HTTP_GET_VARS
But 4.1.1 does not allow $_GET is that true?
I know it was all leading up to 4.2 where register_globals was off by default, but I'm not sure when they started adding it.
Note: I just looked it up. "Introduced in 4.1.0. In earlier versions, use $HTTP_GET_VARS."
So it should be available in 4.1.1.