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