Some tutorials say always use session_start() and others will say it doesn't matter - start a session with session_register(). What's the score here?
Can I start a session with just $_SESSION['myVar'] = $SOMEvAL?
Does session_unregister() not work in some intances? Have read you need to use isset() instead? What's this all about then?
Rgds
session_start() & some
Moderator: General Moderators
Sessions
well its a matter of your choice. if you choose to start the session on every script of your application then it'll be good. my preference is start the session using session_start() and then follow everthing else. i use $_SESSION["variable"] = "value"; to set session variables. once the browser is closed, and is set in most webservers, the session will expire and you can't access unless you know the session id.
once you're done with you session part and you want to finish and cleanup everthing then you can use session_destroy(); to do so.
once you're done with you session part and you want to finish and cleanup everthing then you can use session_destroy(); to do so.