Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

RE: [PHP] $_SESSIONS and printing off.. From: Rich Gray (rich <email protected>)
Date: 02/18/03

Um... how about...

echo 'Welcome '.$_SESSION['username'].', you are still logged in and your
authentication level is '.(isset($_SESSION['level']) ? $_SESSION['level'] :
'unknown');

Or am I missing something here?

Rich

> -----Original Message-----
> From: Frank Keessen [mailto:fkeessen <email protected>]
> Sent: 18 February 2003 12:15
> To: Rich Gray; php-general <email protected>
> Subject: Re: [PHP] $_SESSIONS and printing off..
>
>
> Thanks,
>
> But then another question;
>
> if (isset($_SESSION['username']) && !empty($_SESSION['username'])) {
> > echo 'Welcome '.$_SESSION['username'].', you are still logged in.';
>
>
> I want also checked if the level of authentication = 2; for example
> User Frank = level 1
> User Rich = level 2
>
> I've set $_SESSION['level'] to 2 but how can i check that with the above
> line?
>
> Thanks for your help,
>
> Frank

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php