Jump to content

[SOLVED] SESSION_REGISTER()


chaiwei

Recommended Posts

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 :P

Link to comment
Share on other sites

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. :D

 

<?php
session_start();
$_SESSION['name'] = "DarkWater";
?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.