Re: a question, need an answer

From: Date: Sun, 22 Jun 2003 09:01:54 +0000
Subject: Re: a question, need an answer
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152434@lists.php.net to get a copy of this message
what is the diffirent between : ////////// session_start (); $_SESSION['eventid'] = 'arma2'; /////////// and ///////////// session_start (); session_register('arama2'); /////////// Regards Nabil Both accomplish the same thing, except how you are using it might not be what you expect.
$_SESSION['eventid'] = 'arma2'; will assign the string "arma2" to $_SESSION['eventid'] (obviously). session_register('arama2'); will make the variable $arma2 a session variable. I believe you want session_register('eventid') The session_register way of doing things makes it act a lot like register_globals is on. It seems like we're trying to move away from this style of coding, so I'd suggest you use the first method with the $_SESSION variable.

« previous php.general (#152434) next »