PHP session variables do not persist across page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cksiew
Forum Newbie
Posts: 1
Joined: Fri Jun 12, 2009 11:51 pm

PHP session variables do not persist across page

Post by cksiew »

Hi,
I am having session problems in php6. My session values do not persist across pages, but do, however, accessible when they are retrieved in the same page where they are declared.
all pages have been declared with session_start() at the first line. I have also checked the folder where session data are stored and turned out that they exist.

Any help is deeply appreciated.

:D
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: PHP session variables do not persist across page

Post by omniuni »

Hi cksiew,

Double check your code to make sure you don't have any conditional that is accidentally using "=" instead of "==" and resetting your $_SESSION variable.

If that doesn't turn out to be your problem, let us know.

Good Luck

-OmniUni
Post Reply