Re: <?=SID?> why does this work

From: Date: Thu, 06 Jul 2000 01:21:29 +0000
Subject: Re: <?=SID?> why does this work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5136@lists.php.net to get a copy of this message
In article <70D677608846D41184E20050DA7AA6600ADE5A@144.bzln.com>, keithv@bzln.com (Keith Vance) wrote: > Why does a link like this work for adding the PHPSESSID to the URL. <? > print ( "To continue, <A HREF=\"test_member2.php?" );?><?=SID?><? > print ( > "\">click here</A>" ); ?> <?= is short-hand for <?php echo It's one of the few ideas PHP "stole" from ASP. Mainly because it's one of the few nice features of ASP. :-) > I don't get understand this, but I think I should. Also, is it possible to > make $PHPSESSID global and be able to access it inside a function. I can't > seem to get that work. I think SID is a constant, and therefore is inherently global and available everywhere... There's really currently no such thing as a global variable from the perspective of not inside a function: Only inside a function can a variable be declared global. Constants, however, are global by their nature. -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#5136) next »