Checkin to see if a Session variable is set.

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
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Checkin to see if a Session variable is set.

Post by nickman013 »

I was wondering if anyone can tell me, or direct me to a tutorial on explaining how to see if a session is set.

Basically I have a "Agree to the rules" page, and if the user clicks yes, I would like a session to be started ( i know how to do that) and I want to be able to protect all the pages on mysite. I would like to do this by redirecting the users that dont have the session set. And for the people that do, I want them to be able to view the page.

Thank You.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

isset(), simple enough.
Post Reply