$_SESSION

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
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

$_SESSION

Post by Gen-ik »

Am I right in thinking that if you use $_SESSION you don't need to use SESSION_START() with it?

The only reason I ask is because I've just noticed I haven't included (or can't find) session_start() on my new site but it seems to be working ok..... and it's confused me a bit :roll:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

session_start() starts the the session handling. If you do not call it $_SESSION is without life ;-)
No session id will be searched or created and no data is loaded or saved.
Stoneguard
Forum Contributor
Posts: 101
Joined: Wed Aug 13, 2003 9:02 pm
Location: USA

Post by Stoneguard »

I would be willing to bet you have a session_start in there somewhere. My code refuses to recognize session vars without it.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

You might have the setting in the php.ini to automaticly start sessin = On?
Post Reply