Re: Sessions with register_globals = off
| From: | Daniel Guerrier | Date: | Fri, 06 Sep 2002 19:11:26 +0000 |
| Subject: | Re: Sessions with register_globals = off | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115545@lists.php.net to get a copy of this message | ||
Here you go
http://www.zend.com/manual/function.session-is-registered.php
--- Mauricio Cuenca <mauricio@aguapanela.com> wrote:
> Hello,
>
> I'm working with register_globals turned off. I'm
> setting this session
> cookie:
>
> if ($nresult) {
> if (mysql_numrows($nresult)) {
> session_start();
> $_SESSION['auth'] = 'TRUE'; } }
>
> And then I'm checking if the cookie is set, but it
> doesn't work:
> if ($_SESSION['auth'] == 'TRUE') {
> show_menu(); }
>
> Is there any error on my code ? What am I doing
> wrong ?
> I read this on http://www.php.net/release_4_1_0.php:
> "Another neat trick is that creating new entries in
> the $_SESSION array will
> automatically register them as session variables, as
> if you called
> session_register(). This trick is limited to the
> session module only - for
> example, setting new entries in $_ENV will *not*
> perform an implicit
> putenv()."
>
> That's what I am not using
> sessione_register($variable).
>
> TIA,
>
> _____________________
> Mauricio Cuenca
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com