Problem with is_array() and empty() for $_SESSION...
| From: | Scott Fletcher | Date: | Fri, 14 Nov 2003 16:58:10 +0000 |
| Subject: | Problem with is_array() and empty() for $_SESSION... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169652@lists.php.net to get a copy of this message | ||
Hi Everyone!
I'm a little bit baffled by this problem. The sample script below
showed that it should work but it doesn't because most of them returned
false...
--snip--
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...
echo empty($_SESSION[USER_ID]); //This spitted out result as
"1"...
echo empty($_SESSION[CUSTOMER_ID]); //This spitted out result as a
blank...
echo empty($_SESSION[USER_LOGON1]); //This spitted out result as "1"...
echo empty($_SESSION['PHPSESSID']); //This spitted out result as
"1"...
--snip--
It was working fine from before until I expanded the customer table by
adding 6 more columns to it and updated the $_SESSION script by assigning
the odbc_result data to each one of them (6 addition)... I have no idea
what is the problem here...
Scott F.