problems with sessions (not working)
| From: | Christian Dechery | Date: | Sat, 27 Oct 2001 18:58:15 +0000 |
| Subject: | problems with sessions (not working) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-72576@lists.php.net to get a copy of this message | ||
I have a file called miec.php that does quite a lot of processing and then include()s user_track.inc.php...
miec.php:
--------
<?
a lot of db processing .... (NO OUTPUT whatsoever)
include("user_track.inc.php");
UserTrack($products);
the output starts here...
?>
user_track.inc.php:
------------------
<?
session_start();
function UserTrack($products)
{
global $prod_views;
if( !session_is_registered("prod_views") )
{
fill the $prod_views array, serialize it...
session_register("prod_views");
// I've tested the code above... and session_register returns TRUE and I saw the session file...
}
else
{
do other stuff with the prod_views array
}
}
?>
the problem is.... why does it NEVER go into the 'else'... it seems that the session is registered... but as soon as I refresh the page the session is lost...
why?
_____________________________
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br