What are the potential issues with using session_register() in PHP for user login functionality?

Using session_register() in PHP for user login functionality is not recommended as it has been deprecated since PHP 5.3.0 and removed in PHP 5.4.0 due to security concerns. Instead, it is recommended to use the $_SESSION superglobal array to store and access session variables securely.

// Using $_SESSION superglobal array for user login functionality
session_start();

// Set session variable
$_SESSION['user_id'] = $user_id;

// Access session variable
$user_id = $_SESSION['user_id'];