Jump to content

sessoin_register


hamza

Recommended Posts

Edit: Basically says the same as above ^^

 

session_register(), session_is_registered(), and session_unregister() were depreciated 8 years ago, finally throw a depreciated error in php5.3, and have been completely removed in php6. You should not even know there is a function named session_register(). Either someone disabled it in your php version or you are using php6.

 

To set or reference a session variable, you use the $_SESSION array (also requires a session_start() statement on any page the sets or references a session variable) -

 

$_SESSION['some_name'] = some_value;

if(isset($_SESSION['some_name'])){
    // do something if the variable is set
    echo $_SESSION['some_name'];
}

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/200675-sessoin_register/#findComment-1053063
Share on other sites

Edit: Basically says the same as above ^^

 

session_register(), session_is_registered(), and session_unregister() were depreciated 8 years ago, finally throw a depreciated error in php5.3, and have been completely removed in php6. You should not even know there is a function named session_register(). Either someone disabled it in your php version or you are using php6.

 

To set or reference a session variable, you use the $_SESSION array (also requires a session_start() statement on any page the sets or references a session variable) -

 

$_SESSION['some_name'] = some_value;

if(isset($_SESSION['some_name'])){
    // do something if the variable is set
    echo $_SESSION['some_name'];
}

 

 

 

 

 

 

if a project is already coded in old php version and using old function .

then what is the possible solution for it to remover these errors.

Link to comment
https://forums.phpfreaks.com/topic/200675-sessoin_register/#findComment-1053086
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.