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 -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -