How to register a variable in a PHP session.

below we can register a variable session_register() function.It is deprecated now and we can set directly a value in $_SESSION Global.How to register a variable in a PHP session.

<?php
   // Starting session
    session_start();
   // Use of session_register() is deprecated
    $username = "Test";
    session_register("username");
   // Use of $_SESSION is preferred
    $_SESSION["username"] = "Test";
?>

What is SaaS?expoundsofttechsolution

What is SaaS? Software as a Service