In PHP 5.3 or below we can register a variable session_register() function.It is deprecated now and we can set directly a value in $_SESSION Global. 😀
Example usage:
1 2 3 4 5 6 7 8 9 |
<?php // Starting session session_start(); // Use of session_register() is deprecated $username = "PhpScots"; session_register("username"); // Use of $_SESSION is preferred $_SESSION["username"] = "PhpScots"; ?> |