This question already has an answer here:
- PHP alternative to session_is_registered 4 answers
I'm getting the following error:
Fatal error: Call to undefined function session_is_registered()
This is my code:
<? session_start($PHPSESSID);
include_once "includes/config.php";
if (!session_is_registered("sess_lenguaje")) {
session_register("sess_lenguaje");
$_SESSION["sess_lenguaje"] = "es";
}
include_once 'lenguaje/'.$_SESSION["sess_lenguaje"].'.php';
?>
I've been searching for the problem and I see that session_register has been removed from the last version of PHP.
So any idea how can I replace my code to make it work?
</div>