Jump to content

[SOLVED] $_SESSION variable inaccessbile


jjk2

Recommended Posts

very strange. the scripts were working without problem. i made no changes.

 

i have add.php, which writes to

 

session_start();
$_SESSION['vars'][] = $data

 

then i have view.php

session_start();

print_r($_SESSION['vars']);

 

view.php returns empty array().... but all this time, code was working perfectly, and view.php were outputting appropriate contents....

 

i dont understand what is going on....

Link to comment
https://forums.phpfreaks.com/topic/172904-solved-_session-variable-inaccessbile/
Share on other sites

Did you try print_r($data) on the first page?

 

Did you do any changes to your browser, or to the .ini ?

 

i have not made any change to browser or ini. was there a major firefox update ? i have recently upgraded to php 5.2.8....but left php.ini unchanged...even then it was working fine. just today suddenly, it fails.

 

yes i have tried print_r($data) on first page....it works...

 

print_R($_SESSION['vars']) on first page, also works. so it is writing to the session varaible correctly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.