PHP session variables lost after redirect -


session variables lost after using following code redirect:

    header('location: ./protected_page.php');     exit; //doesn't seem 

on protected page make sure use session_start() before referencing session variables.

please help!

  • you redirect same domain.if redirecting www.thedomain.com thedomain.com can possibly end session

  • ensure register_globals off, can check on php.ini file , using phpinfo().

  • the session variables aren't overwritten.

  • switching between http , https can end session.

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

ios - MKMapView fails to load tiles with HTTP 410 error -

c# - How to utilize EF and LINQ to add filters and specify tables, columns, filters and order by dynamically -