Is it advisable to use $HTTP_SESSION_VARS instead of $_SESSION in older PHP versions like 4.0.6?

Using $HTTP_SESSION_VARS is not advisable as it is deprecated and removed in newer PHP versions. It is recommended to use $_SESSION instead, which is the standard superglobal variable for session data in PHP.

<?php
session_start();

// Storing data in the session
$_SESSION['username'] = 'JohnDoe';

// Retrieving data from the session
$username = $_SESSION['username'];
echo $username;
?>