Session Handling

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
vchris
Forum Contributor
Posts: 204
Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec

Session Handling

Post by vchris »

Hey all,

I am creating a site with an admin panel.

I'd like to know what is the best way to verify if the user is logged in? (Cookies, session variables...)

I tried with the session way but seems like it doesn't work. Here is the error I got:
Undefined variable: _SESSION

I want to do it with session. how is it done?

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

Post by feyd »

make sure to call session_start()
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Post Reply