Re: [PHP3] Sessions - PHP Vs. ASP

From: Date: Fri, 30 Jun 2000 19:50:29 +0000
Subject: Re: [PHP3] Sessions - PHP Vs. ASP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4128@lists.php.net to get a copy of this message
In article <20000620162553.28725.qmail@web3706.mail.yahoo.com>, thomasedisonjr@yahoo.com ("Thomas Edison Jr.") wrote: > How different are PHP sessions from ASP sessions? How > do u really use sessions in PHP? I'm from an ASP > background and i always found sessions to be one of > the most usefull things in ASP. ASP sessions use cookies, and if the user refuses cookies, you're screwed, but Microsoft buries that fact 'way in their docs, and mostly refers to session variables as if they just always work by magic. PHP assumes you have a clue, and thus are willing to a little extra work to get the functionality you think is best, and provides a slightly lower-level support. In particular, you need to do: session_start(); at the top of any page using sessions, and session_register('foo'); to register a variable $foo before you use it, and Either compile with --enable-trans-sid so the URLs and FORMs all automatically get the SID stuff in them, or you are willing to ensure that the SID is passed along where you need it if the user has cookies turned off. -- 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 (#4128) next »