Re: RE: $PHP_SELF in Netscape PART 2

From: Date: Wed, 14 Feb 2001 16:08:38 +0000
Subject: Re: RE: $PHP_SELF in Netscape PART 2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39657@lists.php.net to get a copy of this message
Ok, I feel like the big idiot now. I fixed the problem. It was because of the whole global bit. The ones that were not working were inside a function, the ones that were working were outside the function. I guess I ASSUMED (yeah we know what happens when you do that) that things like $PHP_SELF were always global. Sorry to have bothered everyone :( - John Vanderbeck - Admin, GameDesign ----- Original Message ----- From: "John Vanderbeck" <agathorn@cfl.rr.com> To: <php-general@lists.php.net> Sent: Wednesday, February 14, 2001 10:59 AM Subject: [PHP] RE: $PHP_SELF in Netscape PART 2 > I converted everythign over to use '.' instead of ',' but I still get the > same exact results. That is, $PHP_SELF is resolved to NULL, and every other > variable to the correct data. Here is the new string: > > echo '<BR><A HREF="' .$PHP_SELF. > '?mode=sub_category&category=' > .$category. '&sub_category=' .urlencode($subcategories[$index]). > '">' > .$subcategories[$index]. '</A>'; > > > I think i'm just going to give up on this and rewrite it, because it DOES > work if I do the old double quotes bit. Just means I need to re-arrange it > and do it in multiple ECHO statements, because I can't do the urlencode() in > double quotes. But I would really like to understand WHY this doesn't work. > Again, all other varaibles are properly resolved, and in IE $PHP_SELF is > properly resolved. > > - John Vanderbeck > - Admin, GameDesign > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#39657) next »