-1

I am using $_SESSION array and on one page when I print array by using print_r($_SESSION); then it displays data, but on the same page when I include another page and that page also have print_r($_SESSION); but don't show any data. Means on the same page it shows data one time and the second time it displays an empty array.

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Sunny
  • 9

1 Answers1

1

you should start every page with session_start();

Hamid Vetr
  • 111
  • 4
  • Thanks for answer But I am including that page in a page where I am using Session again. Like My index.php page have code : print_r($_SESSION); include_once 'Header.php'; On this page, data is showing But in header.php data is not showing – Sunny Feb 07 '18 at 12:07