Is it possible to assign session_id() a new value manually?
I’ve tried the following but it’s not working:
session_start();
$sessionId = session_id();
echo $sessionId;
if ($sessionId != $ses) {
session_id() = $ses;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can using
session_id():session_id()can be used to either get the session ID or set it by passing in an optional function argument as I have done above.It is worth noting the following from the manual with regard function call order and session ID character restrictions: