chaiwei Posted November 27, 2008 Share Posted November 27, 2008 Hi all, Is it the SESSION_REGISTER is being deprecated already? Actually what means by deprecated? Is it it should not be use already?(but still function yet.) If I am not using session_register what else can i set a session? Please advise. thanks Quote Link to comment Share on other sites More sharing options...
Jahren Posted November 27, 2008 Share Posted November 27, 2008 deprecated means It's still possible to use it but that you can run into problems since it wont get updated anymore. use that instead ^^ session_start(); $_SESSION["variable_something"] = 'Yay! i'm into a session var!!'; edit : thanks DarkWater for session_start() I forgot Quote Link to comment Share on other sites More sharing options...
DarkWater Posted November 27, 2008 Share Posted November 27, 2008 session_register() is indeed deprecated. That means that it is highly discouraged to use it at all, and it could be potentially removed. You should just use the $_SESSION superglobal for all your session needs. <?php session_start(); $_SESSION['name'] = "DarkWater"; ?> Quote Link to comment Share on other sites More sharing options...
Jahren Posted November 27, 2008 Share Posted November 27, 2008 yeah don't forget about session_start(); XD thanks DarkWater Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 27, 2008 Share Posted November 27, 2008 session_register(), session_is_registered() and session_unregister() are dependent on register_globals. Register_globals were turned off starting in php4.2 in the year 2002. No new code should have been written after that point in time that used these functions. These functions have been removed in php6. Any code using them will stop working under php6 and must be changed to use the $_SESSION array variables. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.