Sorry for the duplicate...  MS-Outlook Express returned an error message
saying it had socket problem with PHP newsgroup.

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for jogging my memory.  I seem to be so focus on this for a couple
of
> hours and didn't happen to see that I make one minor typo with adding the
> six $_SESSION data.  I assign the odbc_result() to it, so forgot to
> increment the number on one of them, so the rest after it was off by one.
> So, it's my fault.
>
> One question though, wouldn't it make more sense to have the result be
> either as 0 or 1 (or true or false) instead of blank or 1.  I first
> interpret the blank as something is wrong with the script or functions.
>
> Thanks,
>  Scott F.
>
> "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > --- Scott Fletcher <[EMAIL PROTECTED]> wrote:
> > > session_start();
> > >
> > > print_r($_SESSION);
> > > //This one work because it spitted out datas from previous webpage
> > >
> > > echo (!(is_array($_SESSION)));
> > > //This spitted out result as a blank
> >
> > This is because echo deals with strings. The boolean false is the empty
> > string when converted. Because $_SESSION is an array, your is_array()
> > returns true, and your not (!) makes the expression false.
> >
> > > echo empty($_SESSION[USER_ID]);
> > > //This spitted out result as "1"
> >
> > Because you have not set this variable (at least, not in the code you
> > provided), empty() returns true. The boolean true will be output as 1.
> >
> > > echo empty($_SESSION[CUSTOMER_ID]);
> > > //This spitted out result as a blank
> >
> > This means $_SESSION['CUSTOMER_ID'] is not empty.
> >
> > > echo empty($_SESSION[USER_LOGON1]);
> > > //This spitted out result as "1"
> >
> > This means $_SESSION['USER_LOGON1'] is empty.
> >
> > > echo empty($_SESSION['PHPSESSID']);
> > > //This spitted out result as "1"
> >
> > This means $_SESSION['PHPSESSID'] is empty.
> >
> > > I have no idea what is the problem here.
> >
> > Do my comments help? If you are wondering why some things are defined
and
> > others are not, please show us the output of print_r() in addition to
> > these conditional statements, and we can compare the results. Otherwise,
> > we have to assume that your conditional statements are working as
> > expected.
> >
> > Hope that helps.
> >
> > Chris
> >
> > =====
> > Chris Shiflett - http://shiflett.org/
> >
> > PHP Security Handbook
> >      Coming mid-2004
> > HTTP Developer's Handbook
> >      http://httphandbook.org/
> > RAMP Training Courses
> >      http://www.nyphp.org/ramp

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

Reply via email to