session var for all pages

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
nqm
Forum Newbie
Posts: 1
Joined: Fri May 08, 2009 4:42 pm

session var for all pages

Post by nqm »

Dear,

Am new to PHP, I am not able to access the session variable on all of the website pages. However the PHP page where I have created the object of the class which actually starts the session, easily allows me to access all session properties.

I think the problem is with the object of the class that starts the session, can any one help me if this is the case then where I should place it, so that it would be easily accessible by all the pages directly.

thanks in adv
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: session var for all pages

Post by Benjamin »

Can you post your code please? You need to ensure that you are starting a session on all pages that require the use of sessions.

:arrow: Moved to PHP - Code
Post Reply