variables – php session not going to next page in wordpress

i have a wordpress website, as the sessions are not activated by default I did the following code in my function.php:

function ur_theme_start_session()

if (!session_id())
add_action(“init”, “ur_theme_start_session”, 1);

now I am getting value from URL and storing it in session like below:

$_SESSION('accessory') = $_GET('item');


the sessions variable is only echoing in the same page where the variable is retrieved, when i go to other pages the values is not stored, can anyone please tell me how to fi it, thanks in advance